-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (81 loc) · 1.83 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
79
80
81
82
83
84
85
86
87
88
89
90
91
version: '3'
services:
web:
build:
context: ./
dockerfile: Dockerfile
image: aquapy_django
env_file: aquapy.env
ports:
- "8000:8000"
tty: True
command: |
sh -c "python manage.py migrate --noinput && \
gunicorn -c gunicorn.py aquapy.wsgi"
restart: unless-stopped
depends_on:
- postgres
- influxdb
- redis
devices:
- /dev/i2c-1:/dev/i2c-1
worker:
build:
context: ./
dockerfile: Dockerfile
image: aquapy_django
env_file: aquapy.env
tty: True
command: python manage.py rqworker
restart: unless-stopped
depends_on:
- web
devices:
- /dev/i2c-1:/dev/i2c-1
scheduler:
build:
context: ./
dockerfile: Dockerfile
image: aquapy_django
env_file: aquapy.env
tty: True
command: python manage.py rqscheduler
restart: unless-stopped
depends_on:
- postgres
- redis
postgres:
image: postgres:11
env_file: aquapy.env
restart: unless-stopped
volumes:
- postgres_vol:/var/lib/postgresql/data
influxdb:
image: influxdb:latest
env_file: aquapy.env
restart: unless-stopped
volumes:
- influxdb_vol:/var/lib/influxdb
- ./init-influxdb.sh:/docker-entrypoint-initdb.d/init-influxdb.sh
grafana:
image: grafana/grafana:latest
env_file: aquapy.env
restart: unless-stopped
depends_on:
- influxdb
ports:
- "80:3000"
volumes:
- grafana_vol:/var/lib/grafana
redis:
image: redis:5-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --appendonly yes --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
env_file: aquapy.env
restart: unless-stopped
volumes:
grafana_vol:
influxdb_vol:
postgres_vol: