-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
48 lines (46 loc) · 1.13 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
version: '2.2'
services:
nginx:
depends_on:
- server
- client
restart: always
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- '80:80'
client:
depends_on: [server]
build:
context: ./client # Find docker file in dir
dockerfile: Dockerfile
ports:
- "3000:3000" # <pc-port: dockerfile-port>
volumes:
- /usr/node_modules
restart: on-failure
container_name: client # must be globally unique and is used in integration
server:
depends_on:
- mongo
build:
context: ./server # Find docker file in dir
dockerfile: Dockerfile
ports:
- "3030:3030" # <pc-port: dockerfile-port>
volumes:
- /usr/node_modules
restart: on-failure
container_name: server # must be globally unique and is used in integration
env_file:
- ./server/.env
mongo:
image: mongo
restart: on-failure
container_name: mongo-db
ports:
- "27018:27017" # <pc-port: dockerfile-port>
volumes:
- ./db-service/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- ./db-service/mongo:/data/db