-
Notifications
You must be signed in to change notification settings - Fork 38
/
docker-compose.local.yml
51 lines (48 loc) · 1.22 KB
/
docker-compose.local.yml
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: '3.8'
services:
mongo: # Remove this if you use external MongoDB service such as MongoDB Atlas
restart: always
image: mongo:latest
api-server:
restart: always
build:
context: ./
dockerfile: ./server/Dockerfile.prod
env_file: .env.prod
environment:
- NODE_ENV=production # Override the NODE_ENV in .env file
- MONGO_URI=mongodb://mongo/merndb # Remove this if you use external MongoDB service such as MongoDB Atlas
depends_on:
- mongo
client:
restart: always
build:
context: ./
dockerfile: ./client/Dockerfile.prod
args:
- facebook_app_id=${FACEBOOK_APP_ID}
- google_client_id=${GOOGLE_CLIENT_ID}
environment:
- TZ
depends_on:
- api-server
nginx-proxy:
restart: always
build:
context: ./
dockerfile: ./nginx-proxy/Dockerfile.prod
volumes:
- /mern-stack/ssl:/etc/nginx/ssl
ports:
- '80:80'
- '443:443'
environment:
- NGINX_LE_EMAIL
- NGINX_LE_FQDN
- NGINX_LE_LETSENCRYPT
- NGINX_LE_PLACEHOLDER_1=${SERVER_PORT}
- NGINX_LE_PLACEHOLDER_2=${PUBLIC_IP_ADDRESS}
- NGINX_LE_TZ
depends_on:
- api-server
- client