-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
57 lines (53 loc) · 1.29 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
52
53
54
55
56
57
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
volumes:
- ./flask:/src
depends_on:
- mongo
mongo:
image: mongo
volumes:
- ./mongo/db:/data/db
- ./mongo/mongod.conf:/etc/mongod.conf
mqtt-sub:
build:
context: mqtt-sub
dockerfile: Dockerfile
volumes:
- ./mqtt-sub/app:/mqtt-sub/app
restart: always
#command: /usr/local/bin/python "./app/sub-pzem-004t.py"
#ports:
# - 1883:1883
#command: "chmod" "+x" "./app/run.sh"
#command: ./app/run.sh
#command: "python ./app/hello.py"
#command: "python ./app/sub-pzem-004t.py"
command: "python ./app/sub-1.py"
#command: "python ./app/hello.py"
depends_on:
- mongo
# networks:
# - app-network
networks:
app-network:
driver: bridge