Skip to content

Commit

Permalink
Add production start script (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhoop authored Apr 7, 2023
1 parent 27b3d01 commit e1cc530
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 22 deletions.
53 changes: 32 additions & 21 deletions fe/config/application.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ development:
# === FE ===
API_URL: http://localhost:8080/api/v1
FE_PORT: 3000


# === BE ===
# PORT
Expand All @@ -27,7 +27,7 @@ development:
# SWAGGER
SWAGGER_SERVER_URL: http://localhost:3000
SWAGGER_ENDPOINT: /api-docs

# API
BASE_PATH: /api/v1
SERVER_STATIC_BUILD: 'false'
Expand All @@ -41,7 +41,7 @@ test:
# === FE ===
API_URL: http://localhost:8080/api/v1
FE_PORT: 3000


# === BE ===
# PORT
Expand All @@ -61,29 +61,40 @@ test:
# SWAGGER
SWAGGER_SERVER_URL: http://localhost:3000
SWAGGER_ENDPOINT: /api-docs

# API
BASE_PATH: /api/v1
SERVER_STATIC_BUILD: 'true'

# production:
# # ENV
# ENV: production

# # FE
# API_URL:
production:
NODE_ENV: production
ENV: production
PROXY_ENFORCE: false
PROXIED_API_URL: ''
PROXIED_API_TOKEN: ''

# # BE
# PORT:
# === FE ===
API_URL: /api/v1

# # LOG
# LOG_FORMAT: dev
# LOG_DIR: ../logs
# === BE ===
# PORT
PORT: 8080

# # CORS
# ORIGIN:
# CREDENTIALS: true
# LOG
LOG_FORMAT: prod
LOG_DIR: ../../../tmp

# CORS
ORIGIN: "*" # we'll want to limit CORS in prod once we have a domain
CREDENTIALS: true

# SWAGGER_SERVER_URL: http://localhost:3000
# SWAGGER_ENDPOINT: /api-docs

# # DATABASE
# DATABASE_URL: your-production-postgres-url
# SHADOW_DATABASE_URL: your-production-shadow-postgres-url
# API
BASE_PATH: /api/v1
SERVER_STATIC_BUILD: 'true'

# DATABASE
DATABASE_URL: your-production-postgres-url
SHADOW_DATABASE_URL: your-production-shadow-postgres-url
2 changes: 1 addition & 1 deletion fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@
"webpack-bundle-analyzer": "^4.5.0",
"webpack-dev-server": "^4.7.4"
}
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"fe:build": "yarn --cwd fe build",
"be:dev": "yarn --cwd be dev",
"be:server": "node ./be/server.js",
"deploy": "yarn && NODE_ENV=production yarn fe:build && NODE_ENV=production yarn be:server",
"dev": "concurrently --kill-others --names \"FE,BE\" -c \"bgBlue.bold,bgMagenta.bold\" \"yarn fe:start\" \"yarn be:dev\"",
"test:integration": "cypress run",
"test": "yarn && node scripts/test-suite.mjs",
Expand Down

0 comments on commit e1cc530

Please sign in to comment.