2019-10-04 10:50:26 +01:00
|
|
|
---
|
|
|
|
version: '3.2'
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgresql:
|
|
|
|
image: postgres
|
|
|
|
volumes:
|
|
|
|
- database:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=${PG_PASS:-thisisnotagoodpassword}
|
|
|
|
- POSTGRES_USER=passbook
|
|
|
|
- POSTGRES_DB=passbook
|
|
|
|
labels:
|
|
|
|
- traefik.enable=false
|
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
labels:
|
|
|
|
- traefik.enable=false
|
|
|
|
server:
|
2020-05-27 16:26:35 +01:00
|
|
|
image: beryju/passbook:${PASSBOOK_TAG:-latest}
|
2019-10-04 10:50:26 +01:00
|
|
|
command:
|
|
|
|
- uwsgi
|
2019-10-04 11:45:19 +01:00
|
|
|
- uwsgi.ini
|
2019-10-04 10:50:26 +01:00
|
|
|
environment:
|
|
|
|
- PASSBOOK_REDIS__HOST=redis
|
2019-11-20 12:13:10 +00:00
|
|
|
- PASSBOOK_ERROR_REPORTING=${PASSBOOK_ERROR_REPORTING:-false}
|
2019-10-04 10:50:26 +01:00
|
|
|
- PASSBOOK_POSTGRESQL__HOST=postgresql
|
|
|
|
- PASSBOOK_POSTGRESQL__PASSWORD=${PG_PASS:-thisisnotagoodpassword}
|
|
|
|
ports:
|
|
|
|
- 8000
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
labels:
|
|
|
|
- traefik.port=8000
|
|
|
|
- traefik.docker.network=internal
|
|
|
|
- traefik.frontend.rule=PathPrefix:/
|
|
|
|
worker:
|
2020-05-27 16:26:35 +01:00
|
|
|
image: beryju/passbook:${PASSBOOK_TAG:-latest}
|
2019-10-04 10:50:26 +01:00
|
|
|
command:
|
2019-10-09 13:29:44 +01:00
|
|
|
- celery
|
2019-10-04 10:50:26 +01:00
|
|
|
- worker
|
2019-10-09 13:29:44 +01:00
|
|
|
- --autoscale=10,3
|
|
|
|
- -E
|
|
|
|
- -B
|
|
|
|
- -A=passbook.root.celery
|
2019-10-10 16:13:23 +01:00
|
|
|
- -s=/tmp/celerybeat-schedule
|
2019-10-04 10:50:26 +01:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
labels:
|
|
|
|
- traefik.enable=false
|
|
|
|
environment:
|
|
|
|
- PASSBOOK_REDIS__HOST=redis
|
2019-11-20 12:13:10 +00:00
|
|
|
- PASSBOOK_ERROR_REPORTING=${PASSBOOK_ERROR_REPORTING:-false}
|
2019-10-04 10:50:26 +01:00
|
|
|
- PASSBOOK_POSTGRESQL__HOST=postgresql
|
|
|
|
- PASSBOOK_POSTGRESQL__PASSWORD=${PG_PASS:-thisisnotagoodpassword}
|
|
|
|
static:
|
2019-12-30 09:25:35 +00:00
|
|
|
image: beryju/passbook-static:latest
|
2019-10-04 10:50:26 +01:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
labels:
|
2019-10-04 11:01:38 +01:00
|
|
|
- traefik.frontend.rule=PathPrefix:/static, /robots.txt
|
2020-05-16 19:39:38 +01:00
|
|
|
- traefik.port=80
|
2019-10-04 10:50:26 +01:00
|
|
|
- traefik.docker.network=internal
|
|
|
|
traefik:
|
|
|
|
image: traefik:1.7
|
2020-06-16 20:34:48 +01:00
|
|
|
command: --api --docker --defaultentrypoints=https --entryPoints='Name:http Address::80 Redirect.EntryPoint:https' --entryPoints='Name:https Address::443 TLS'
|
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: {}
|