-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
69 lines (64 loc) · 1.48 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
version: "3.9"
services:
mongodb:
image: mongo:4.0.8
container_name: mongodb
hostname: mongodb
# restart: unless-stopped
command: mongod --auth
env_file:
- .env
volumes:
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- ./mongodb_data:/data/db
ports:
- '27017-27019:27017-27019'
networks:
- backend
flak_api:
build: api
image: flak_api:v1
# restart: unless-stopped
container_name: flask_API
ports:
- "5000:5000"
volumes:
- ./api/:/api/
env_file:
- .env
depends_on:
- mongodb
networks:
- frontend
- backend
webserver:
image: nginx:alpine
container_name: webserver
restart: unless-stopped
environment:
APP_ENV: "prod"
APP_NAME: "webserver"
APP_DEBUG: "false"
SERVICE_NAME: "webserver"
tty: true
volumes:
- ./nginx_data:/var/log/nginx
ports:
- "91:80"
depends_on:
- flak_api
- mongodb
networks:
- frontend
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
mongodb_data:
driver: local
api:
driver: local
nginx_data:
driver: local