mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
load each environment variable automatically from the env file
This commit is contained in:
@@ -1,18 +1,29 @@
|
||||
# Note that .env file will automatically populate
|
||||
# variables in this file.
|
||||
# If these variables are also set on the host system,
|
||||
# those will be used over the .env file.
|
||||
# See https://vsupalov.com/docker-arg-env-variable-guide/
|
||||
|
||||
x-common-environment: &common-server-environment
|
||||
APNS_IS_PRODUCTION: ${APNS_IS_PRODUCTION}
|
||||
APNS_BUNDLE_ID: ${APNS_BUNDLE_ID}
|
||||
APNS_TEAM_ID: ${APNS_TEAM_ID}
|
||||
APNS_KEY_ID: ${APNS_KEY_ID}
|
||||
APNS_PRIVATE_KEY: ${APNS_PRIVATE_KEY}
|
||||
|
||||
services:
|
||||
dev:
|
||||
build: .
|
||||
command: npm run start:dev
|
||||
ports:
|
||||
- "4000:4000"
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
<<: *common-server-environment
|
||||
volumes:
|
||||
- .:/usr/src/app
|
||||
|
||||
# Note that neither app-integration-test or test modes require env variables,
|
||||
# need to find a way to pass variables without .env if this changes
|
||||
|
||||
app-integration-test:
|
||||
build: .
|
||||
command: npm run start:dev integration-testing
|
||||
@@ -20,6 +31,9 @@ services:
|
||||
- "4000:4000"
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
<<: *common-server-environment
|
||||
|
||||
volumes:
|
||||
- .:/usr/src/app
|
||||
|
||||
@@ -28,6 +42,9 @@ services:
|
||||
command: npm run test
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
<<: *common-server-environment
|
||||
|
||||
volumes:
|
||||
- .:/usr/src/app
|
||||
redis:
|
||||
|
||||
Reference in New Issue
Block a user