forked from t-ho/mern-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (46 loc) · 1.09 KB
/
docker-compose.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
version: '3.8'
services:
mongo:
image: mongo:latest
ports:
- '27018:27017'
api-server:
build:
context: ./
dockerfile: ./server/Dockerfile
volumes:
- /mern-stack/server/node_modules
- ./server:/mern-stack/server
environment:
- MONGO_URI=mongodb://mongo/merndb
ports:
- '${SERVER_PORT}:${SERVER_PORT}'
depends_on:
- mongo
client:
build:
context: ./
dockerfile: ./client/Dockerfile
volumes:
- /mern-stack/client/node_modules
- ./client:/mern-stack/client
stdin_open: true # FIXME: https://github.com/facebook/create-react-app/issues/8688
ports:
- '${PORT}:${PORT}'
depends_on:
- api-server
nginx-proxy:
restart: always
build:
context: ./
dockerfile: ./nginx-proxy/Dockerfile
ports:
- '${NGINX_PROXY_PORT}:${NGINX_PROXY_PORT}'
environment:
- NGINX_LE_PLACEHOLDER_1=${PORT}
- NGINX_LE_PLACEHOLDER_2=${SERVER_PORT}
- NGINX_LE_PLACEHOLDER_3=${NGINX_PROXY_PORT}
- NGINX_LE_TZ
depends_on:
- api-server
- client