olgram/docker-compose-release.yaml

84 lines
2.1 KiB
YAML
Raw Normal View History

2021-06-11 21:56:03 +03:00
version: '3'
services:
postgres:
image: kartoza/postgis
2021-07-11 12:53:33 +03:00
restart: unless-stopped
env_file:
- release.env
2021-06-11 21:56:03 +03:00
volumes:
- database:/var/lib/postgresql/data
2021-09-09 23:35:13 +03:00
networks:
- traefik
redis:
image: 'bitnami/redis:latest'
2021-07-11 12:53:33 +03:00
restart: unless-stopped
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- redis-db:/bitnami/redis/data
2021-07-11 12:53:33 +03:00
env_file:
- release.env
2021-09-09 23:35:13 +03:00
networks:
- traefik
2021-09-09 19:16:28 +03:00
olgram:
image: ghcr.io/civsocit/olgram/bot:stable
2021-07-11 12:53:33 +03:00
restart: unless-stopped
2021-09-09 23:35:13 +03:00
networks:
- traefik
2021-09-09 19:16:28 +03:00
labels:
- 'com.centurylinklabs.watchtower.enable="true"'
2021-09-09 23:35:13 +03:00
- "traefik.enable=true"
- "traefik.http.routers.static.rule=Host(`test.civsoc.it`)"
- "traefik.http.routers.static.tls=true"
- "traefik.http.routers.static.tls.certresolver=le"
- "traefik.http.routers.static.entrypoints=websecure"
- "traefik.docker.network=traefik"
2021-07-11 12:53:33 +03:00
env_file:
- release.env
depends_on:
- postgres
- redis
2021-09-09 19:16:28 +03:00
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./config.json:/config.json
command: --interval 30
2021-09-09 23:35:13 +03:00
networks:
- traefik
traefik:
image: traefik:v2.4
container_name: olgram_traefik
restart: unless-stopped
ports:
- "80:80"
- "443:443"
networks:
- traefik
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./acme:/acme
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --providers.docker=true
- --providers.docker.endpoint=unix:///var/run/docker.sock
- --providers.docker.exposedByDefault=false
- --providers.docker.network=traefik
- --certificatesresolvers.le.acme.email=youmustfly@civsoc.it
- --certificatesresolvers.le.acme.storage=/acme/acme.json
- --certificatesresolvers.le.acme.tlschallenge=false
- --certificatesresolvers.le.acme.httpchallenge=true
- --certificatesresolvers.le.acme.httpchallenge.entrypoint=web
2021-09-09 19:16:28 +03:00
2021-06-11 21:56:03 +03:00
volumes:
database:
redis-db:
2021-09-09 23:35:13 +03:00
networks:
traefik:
driver: bridge