-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
29 lines (29 loc) · 865 Bytes
/
docker-compose.prod.yml
File metadata and controls
29 lines (29 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
services:
mongo-prod:
image: mongo:latest
ports:
- "20717:20717"
volumes:
- /data/db # Create a volume for the DB.
client-prod:
container_name: client
build:
context: ./client
dockerfile: Dockerfile
args: # We need to use arguments to pass env variables defined in client.prod.env passed as --env-file argument in docker compose command to be used during the docker image build.
NODE_ENV_ARG: ${NODE_ENV}
REACT_APP_API_URL_ARG: ${REACT_APP_API_URL}
ports:
- "3000:3000"
restart: always
server-prod:
build:
context: ./server
dockerfile: Dockerfile
depends_on:
- mongo-prod
env_file:
- server.prod.env # Thise are runtime env variables that do not require to be used during docker image build.
ports:
- "8081:8081"
restart: always