1
0
mirror of https://github.com/daniviga/bite.git synced 2024-11-26 14:56:13 +01:00
bite/docker/docker-compose.yml

94 lines
1.8 KiB
YAML
Raw Normal View History

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