Use APP_ENV to determine what config to load, falling back to NODE_ENV

This commit is contained in:
Patrik Oldsberg
2020-10-10 17:41:03 +02:00
parent dc0261e6bc
commit 8afce088ac
13 changed files with 25 additions and 13 deletions
+4 -3
View File
@@ -65,9 +65,10 @@ All `app-config.yaml` files inside the monorepo root and package root are
considered, as are files with additional `local` and environment affixes such as
`development`, for example `app-config.local.yaml`,
`app-config.production.yaml`, and `app-config.development.local.yaml`. Which
environment config files are loaded is determined by the `NODE_ENV` environment
variable. Local configuration files are always loaded, but are meant for local
development overrides and should typically be `.gitignore`'d.
environment config files are loaded is determined by the `APP_ENV` environment
variable, or `NODE_ENV` if it is not set. Local configuration files are always
loaded, but are meant for local development overrides and should typically be
`.gitignore`'d.
All loaded configuration files are merged together using the following rules:
+1 -1
View File
@@ -13,7 +13,7 @@ Run the following commands if you have Docker environment
```bash
$ yarn install
$ yarn docker-build
$ docker run --rm -it -p 7000:7000 -e NODE_ENV=development example-backend:latest
$ docker run --rm -it -p 7000:7000 -e APP_ENV=production -e NODE_ENV=development example-backend:latest
```
Then open http://localhost/ on your browser.