1
0
mirror of https://github.com/barthuijgen/factorio-sites.git synced 2025-01-07 13:40:12 +02:00
factorio-sites/apps/blueprints
2021-03-13 16:57:44 +01:00
..
prisma Update readmes, add fonts locally, fixes to search page props 2021-03-13 15:15:15 +01:00
public Update readmes, add fonts locally, fixes to search page props 2021-03-13 15:15:15 +01:00
specs Working on github workflows 2021-03-11 00:14:27 +01:00
src Update readmes, add fonts locally, fixes to search page props 2021-03-13 15:15:15 +01:00
.babelrc Add FBE editor for in-browser image rendering, ported database to postgres, updated packages 2021-01-10 22:03:07 +01:00
.eslintrc.json nx upgrade 2021-03-11 11:40:14 +01:00
babel-jest.config.json initial commit 2020-10-16 19:37:34 +02:00
index.d.ts Added several ways of generating images, factorioprints scraper and a lot of updates to the main site 2020-10-22 15:53:06 +02:00
jest.config.js initial commit 2020-10-16 19:37:34 +02:00
next-env.d.ts Add FBE editor for in-browser image rendering, ported database to postgres, updated packages 2021-01-10 22:03:07 +01:00
next.config.js Testing dev deploy 2021-03-13 16:57:44 +01:00
README.md Update readmes, add fonts locally, fixes to search page props 2021-03-13 15:15:15 +01:00
tsconfig.json Add FBE editor for in-browser image rendering, ported database to postgres, updated packages 2021-01-10 22:03:07 +01:00
tsconfig.spec.json initial commit 2020-10-16 19:37:34 +02:00

Blueprints application

Setting up the project

  • Add a .env.local file to apps/blueprints/ with the following values
POSTGRES_DB=factorio-blueprints
POSTGRES_USER=factorio-blueprints
#POSTGRES_HOST=127.0.0.1
#POSTGRES_PASSWORD=local
STEAM_WEB_API_KEY=(optional, for steam login)
GOOGLE_APPLICATION_CREDENTIALS="full/path/to/json-key-file.json"
GCP_BLUEPRINT_STRINGS_BUCKET=blueprint-strings
GCP_BLUEPRINT_IMAGES_BUCKET=blueprint-images
  • Add a .env file to apps/blueprints/prisma with a database connection url like
DATABASE_URL="postgresql://factorio-blueprints:local@127.0.0.1:5432/factorio-blueprints"
  • Run DB migration
cd apps/blueprints && npx prisma migrate deploy --preview-feature
  • Run local app
nx serve

Deploying

  • docker build -t eu.gcr.io/factorio-sites/blueprints --file blueprints.Dockerfile .
  • docker tag eu.gcr.io/factorio-sites/blueprints eu.gcr.io/factorio-sites/blueprints:dev
  • docker push eu.gcr.io/factorio-sites/blueprints