-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
78 lines (72 loc) · 1.7 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: '3.7'
services:
client:
build:
context: ./frontend
dockerfile: Dockerfile
tty: true
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- /app/node_modules
networks:
- app-tier
mongodb:
image: mongo
container_name: mongo
ports:
- "27017:27017"
restart: unless-stopped
command: mongod --auth
environment:
MONGO_INITDB_ROOT_USERNAME: "admin"
MONGO_INITDB_ROOT_PASSWORD: "password"
MONGO_INITDB_DATABASE: webapp
MONGODB_DATA_DIR: /data/db
volumes:
- mongodbdata:/data/db
networks:
- app-tier
api:
build:
context: ./backend
dockerfile: Dockerfile
command: gunicorn -w 1 -b 0.0.0.0:5000 server:app --reload
ports:
- "5000:5000"
volumes:
- appdata:/var/www/
links:
- mongodb:mongodb
depends_on:
- mongodb
networks:
- app-tier
nginx:
image: nginx:latest
ports:
- "80:80"
- "8000:8000"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- client
- api
networks:
- app-tier
restart: "on-failure"
redis:
image: redis:latest
container_name: redis
hostname: redis_dev
networks:
- app-tier
networks:
app-tier:
driver: bridge
volumes:
mongodbdata:
driver: local
appdata:
driver: local