2019-10-04 10:50:26 +01:00
|
|
|
---
|
|
|
|
version: '3.2'
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgresql:
|
2020-10-01 09:42:38 +01:00
|
|
|
image: postgres:12
|
2019-10-04 10:50:26 +01:00
|
|
|
volumes:
|
|
|
|
- database:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=${PG_PASS:-thisisnotagoodpassword}
|
|
|
|
- POSTGRES_USER=passbook
|
|
|
|
- POSTGRES_DB=passbook
|
2020-09-14 21:54:25 +01:00
|
|
|
env_file:
|
|
|
|
- .env
|
2019-10-04 10:50:26 +01:00
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
server:
|
2020-10-23 17:42:29 +01:00
|
|
|
image: beryju/passbook:${PASSBOOK_TAG:-0.12.6-stable}
|
2020-09-02 23:04:12 +01:00
|
|
|
command: server
|
2019-10-04 10:50:26 +01:00
|
|
|
environment:
|
2020-09-02 23:04:12 +01:00
|
|
|
PASSBOOK_REDIS__HOST: redis
|
|
|
|
PASSBOOK_POSTGRESQL__HOST: postgresql
|
2020-09-14 21:54:25 +01:00
|
|
|
PASSBOOK_POSTGRESQL__PASSWORD: ${PG_PASS}
|
2019-10-04 10:50:26 +01:00
|
|
|
ports:
|
|
|
|
- 8000
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
labels:
|
2020-10-18 17:46:13 +01:00
|
|
|
traefik.enable: 'true'
|
|
|
|
traefik.docker.network: internal
|
|
|
|
traefik.http.routers.app-router.rule: PathPrefix(`/`)
|
|
|
|
traefik.http.routers.app-router.service: app-service
|
|
|
|
traefik.http.routers.app-router.tls: 'true'
|
|
|
|
traefik.http.services.app-service.loadbalancer.healthcheck.hostname: passbook-healthcheck-host
|
|
|
|
traefik.http.services.app-service.loadbalancer.server.port: '8000'
|
2020-09-14 21:54:25 +01:00
|
|
|
env_file:
|
|
|
|
- .env
|
2019-10-04 10:50:26 +01:00
|
|
|
worker:
|
2020-10-23 17:42:29 +01:00
|
|
|
image: beryju/passbook:${PASSBOOK_TAG:-0.12.6-stable}
|
2020-09-02 23:04:12 +01:00
|
|
|
command: worker
|
2019-10-04 10:50:26 +01:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
environment:
|
2020-09-02 23:04:12 +01:00
|
|
|
PASSBOOK_REDIS__HOST: redis
|
|
|
|
PASSBOOK_POSTGRESQL__HOST: postgresql
|
2020-09-14 21:54:25 +01:00
|
|
|
PASSBOOK_POSTGRESQL__PASSWORD: ${PG_PASS}
|
2020-10-03 19:36:36 +01:00
|
|
|
volumes:
|
|
|
|
- ./backups:/backups
|
2020-10-22 10:30:53 +01:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2020-09-14 21:54:25 +01:00
|
|
|
env_file:
|
|
|
|
- .env
|
2019-10-04 10:50:26 +01:00
|
|
|
static:
|
2020-10-23 17:42:29 +01:00
|
|
|
image: beryju/passbook-static:${PASSBOOK_TAG:-0.12.6-stable}
|
2019-10-04 10:50:26 +01:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
labels:
|
2020-10-18 17:46:13 +01:00
|
|
|
traefik.enable: 'true'
|
|
|
|
traefik.docker.network: internal
|
|
|
|
traefik.http.routers.static-router.rule: PathPrefix(`/static`, `/robots.txt`, `/favicon.ico`)
|
|
|
|
traefik.http.routers.static-router.tls: 'true'
|
|
|
|
traefik.http.routers.static-router.service: static-service
|
|
|
|
traefik.http.services.static-service.loadbalancer.healthcheck.path: /
|
|
|
|
traefik.http.services.static-service.loadbalancer.server.port: '80'
|
2019-10-04 10:50:26 +01:00
|
|
|
traefik:
|
2020-10-18 17:46:13 +01:00
|
|
|
image: traefik:2.3
|
|
|
|
command:
|
2020-10-26 16:57:09 +00:00
|
|
|
- "--log.format=json"
|
2020-10-18 17:46:13 +01:00
|
|
|
- "--api.insecure=true"
|
|
|
|
- "--providers.docker=true"
|
|
|
|
- "--providers.docker.exposedbydefault=false"
|
|
|
|
- "--entrypoints.http.address=:80"
|
|
|
|
- "--entrypoints.https.address=:443"
|
2019-10-04 10:50:26 +01:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
ports:
|
|
|
|
- "0.0.0.0:80:80"
|
|
|
|
- "0.0.0.0:443:443"
|
2020-06-16 20:34:48 +01:00
|
|
|
- "127.0.0.1:8080:8080"
|
2019-10-04 10:50:26 +01:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
database:
|
|
|
|
driver: local
|
|
|
|
|
|
|
|
networks:
|
|
|
|
internal: {}
|