-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (57 loc) · 1.2 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
version: '3.8'
services:
api:
build:
context: ./flask_backend
dockerfile: Dockerfile
command: gunicorn --bind 0.0.0.0:5000 app:app
ports:
- "5000:5000"
environment:
MONGODB_HOST: mongodb
MONGODB_USERNAME: "apiuser"
MONGODB_PASSWORD: "apipassword"
volumes:
- appdata:/var/www
depends_on:
- mongodb
networks:
- react-flask
- flask-mongo
client:
build:
context: ./react_frontend
dockerfile: Dockerfile
tty: true
ports:
- "3000:3000"
volumes:
- ./react_frontend:/app
- /app/node_modules
mongodb:
container_name: mongo
image: mongo:4.4.0
restart: always
command: mongod --auth
environment:
MONGO_INITDB_ROOT_USERNAME: "admin"
MONGO_INITDB_ROOT_PASSWORD: "74942"
MONGO_INITDB_DATABASE: 74942app
MONGODB_DATA_DIR: /data/db
volumes:
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
- mongodbdata:/data/db
ports:
- "27017:27017"
networks:
- flask-mongo
networks:
react-flask:
driver: bridge
flask-mongo:
driver: bridge
volumes:
mongodbdata:
driver: local
appdata:
driver: local