-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
51 lines (48 loc) · 1.13 KB
/
compose.yaml
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
volumes:
# keycloak:
# driver: local
mongo:
driver: local
services:
# web:
# image: nginx
# volumes:
# - ./nginx/nginx.conf:/tmp/nginx.conf
# environment:
# - FLASK_SERVER_ADDR=backend:9091
# command: /bin/bash -c "envsubst < /tmp/nginx.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
# ports:
# - 80:80
# depends_on:
# - backend
backend:
build:
context: flask
target: builder
# flask requires SIGINT to stop gracefully
# (default stop signal from Compose is SIGTERM)
stop_signal: SIGINT
environment:
- FLASK_SERVER_PORT=9091
ports:
- 9091:9091
volumes:
- ./flask:/src
depends_on:
- mongo
mongo:
image: mongo:latest
hostname: test_mongodb
environment:
- MONGO_INITDB_DATABASE=ChatDB
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=pass
volumes:
- ./init-db.js:/docker-entrypoint-initdb.d/init-db.js:ro
ports:
- 27017:27017
# image: mongo
# volumes:
# - mongo:/data/db
# ports:
# - "127.0.0.1:27017:27017"