2020-06-02 00:57:20 +02:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
net:
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
pgdata:
|
2020-06-18 19:09:46 +02:00
|
|
|
staticdata:
|
2020-06-02 00:57:20 +02:00
|
|
|
|
|
|
|
x-op-service-default: &service_default
|
2020-06-08 23:17:16 +02:00
|
|
|
restart: always # unless-stopped
|
2020-06-02 00:57:20 +02:00
|
|
|
init: true
|
|
|
|
|
|
|
|
services:
|
2020-06-03 18:53:33 +02:00
|
|
|
ntpd:
|
|
|
|
<<: *service_default
|
2020-06-08 23:17:16 +02:00
|
|
|
build:
|
|
|
|
context: ./ntpd
|
2020-06-03 18:53:33 +02:00
|
|
|
image: daniviga/ntpd
|
|
|
|
networks:
|
|
|
|
- net
|
|
|
|
ports:
|
2020-06-21 22:58:46 +02:00
|
|
|
- "${CUSTOM_DOCKER_IP:-0.0.0.0}:123:123/udp"
|
2020-06-03 18:53:33 +02:00
|
|
|
|
2020-06-02 00:57:20 +02:00
|
|
|
timescale:
|
|
|
|
<<: *service_default
|
|
|
|
image: timescale/timescaledb:latest-pg12
|
|
|
|
environment:
|
2020-06-17 23:30:00 +02:00
|
|
|
POSTGRES_USER: "bite"
|
2020-06-02 00:57:20 +02:00
|
|
|
POSTGRES_PASSWORD: "password"
|
|
|
|
volumes:
|
|
|
|
- "pgdata:/var/lib/postgresql/data"
|
|
|
|
networks:
|
|
|
|
- net
|
2020-06-08 23:17:16 +02:00
|
|
|
|
2020-06-16 22:48:58 +02:00
|
|
|
broker:
|
2020-06-02 23:20:34 +02:00
|
|
|
<<: *service_default
|
2020-06-16 22:48:58 +02:00
|
|
|
image: eclipse-mosquitto
|
2020-06-21 15:21:00 +02:00
|
|
|
volumes:
|
|
|
|
- "./mqtt/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf"
|
2020-06-02 23:20:34 +02:00
|
|
|
networks:
|
|
|
|
- net
|
|
|
|
ports:
|
2020-06-21 22:58:46 +02:00
|
|
|
- "${CUSTOM_DOCKER_IP:-0.0.0.0}:1883:1883"
|
2020-06-03 19:26:35 +02:00
|
|
|
|
2020-06-15 22:47:55 +02:00
|
|
|
ingress:
|
2020-06-16 22:48:58 +02:00
|
|
|
<<: *service_default
|
2020-06-18 00:02:28 +02:00
|
|
|
image: nginx:stable-alpine
|
2020-06-15 22:47:55 +02:00
|
|
|
ports:
|
2020-06-21 22:58:46 +02:00
|
|
|
- "${CUSTOM_DOCKER_IP:-0.0.0.0}:80:80"
|
2020-06-15 22:47:55 +02:00
|
|
|
networks:
|
|
|
|
- net
|
|
|
|
volumes:
|
2020-06-18 19:09:46 +02:00
|
|
|
- staticdata:/srv/appdata/bite/static
|
|
|
|
- ./ingress/nginx.conf:/etc/nginx/nginx.conf
|
2020-06-18 00:02:28 +02:00
|
|
|
|
2020-06-15 22:47:55 +02:00
|
|
|
|
2020-06-17 23:30:00 +02:00
|
|
|
bite:
|
2020-06-03 19:26:35 +02:00
|
|
|
<<: *service_default
|
2020-06-15 22:47:55 +02:00
|
|
|
build:
|
|
|
|
context: ..
|
|
|
|
dockerfile: ./docker/django/Dockerfile
|
2020-06-17 23:30:00 +02:00
|
|
|
image: daniviga/bite
|
2020-06-18 19:09:46 +02:00
|
|
|
command: ["gunicorn", "-b", "0.0.0.0:8000", "bite.wsgi:application"]
|
2020-06-03 19:26:35 +02:00
|
|
|
networks:
|
|
|
|
- net
|
2020-06-15 22:47:55 +02:00
|
|
|
depends_on:
|
2020-06-15 22:53:02 +02:00
|
|
|
- ingress
|
2020-06-15 22:47:55 +02:00
|
|
|
- data-migration
|
|
|
|
- timescale
|
|
|
|
|
|
|
|
data-migration:
|
2020-06-17 23:30:00 +02:00
|
|
|
image: daniviga/bite
|
2020-06-17 20:08:10 +02:00
|
|
|
command: ["dockerize", "-wait", "tcp://timescale:5432", "python3", "manage.py", "migrate", "--noinput"]
|
2020-06-15 22:47:55 +02:00
|
|
|
networks:
|
|
|
|
- net
|
2020-06-17 20:08:10 +02:00
|
|
|
depends_on:
|
|
|
|
- timescale
|
2020-06-15 22:47:55 +02:00
|
|
|
|
2020-06-18 19:09:46 +02:00
|
|
|
static-files:
|
|
|
|
image: daniviga/bite
|
|
|
|
volumes:
|
|
|
|
- staticdata:/srv/appdata/bite/static
|
|
|
|
command: ["python3", "manage.py", "collectstatic", "--noinput"]
|
|
|
|
|
2020-06-15 22:47:55 +02:00
|
|
|
mqtt-to-db:
|
|
|
|
<<: *service_default
|
2020-06-17 23:30:00 +02:00
|
|
|
image: daniviga/bite
|
2020-06-15 22:47:55 +02:00
|
|
|
command: ["python3", "manage.py", "mqtt-to-db"]
|
|
|
|
networks:
|
|
|
|
- net
|
|
|
|
depends_on:
|
|
|
|
- data-migration
|
|
|
|
- timescale
|
2020-06-16 22:48:58 +02:00
|
|
|
- broker
|