88 lines
2.0 KiB
YAML
88 lines
2.0 KiB
YAML
---
|
|
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:
|
|
image: beryju/passbook:${SERVER_TAG:-latest}
|
|
command:
|
|
- uwsgi
|
|
- uwsgi.ini
|
|
environment:
|
|
- PASSBOOK_DOMAIN=${PASSBOOK_DOMAIN}
|
|
- PASSBOOK_REDIS__HOST=redis
|
|
- PASSBOOK_ERROR_REPORTING=${PASSBOOK_ERROR_REPORTING:-false}
|
|
- 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:
|
|
image: beryju/passbook:${SERVER_TAG:-latest}
|
|
command:
|
|
- celery
|
|
- worker
|
|
- --autoscale=10,3
|
|
- -E
|
|
- -B
|
|
- -A=passbook.root.celery
|
|
- -s=/tmp/celerybeat-schedule
|
|
networks:
|
|
- internal
|
|
labels:
|
|
- traefik.enable=false
|
|
environment:
|
|
- PASSBOOK_DOMAIN=${PASSBOOK_DOMAIN}
|
|
- PASSBOOK_REDIS__HOST=redis
|
|
- PASSBOOK_ERROR_REPORTING=${PASSBOOK_ERROR_REPORTING:-false}
|
|
- PASSBOOK_POSTGRESQL__HOST=postgresql
|
|
- PASSBOOK_POSTGRESQL__PASSWORD=${PG_PASS:-thisisnotagoodpassword}
|
|
static:
|
|
image: beryju/passbook-static:latest
|
|
networks:
|
|
- internal
|
|
labels:
|
|
- traefik.frontend.rule=PathPrefix:/static, /robots.txt
|
|
- traefik.port=8080
|
|
- traefik.docker.network=internal
|
|
traefik:
|
|
image: traefik:1.7
|
|
command: --api --docker
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
ports:
|
|
- "0.0.0.0:80:80"
|
|
- "0.0.0.0:443:443"
|
|
- "0.0.0.0:8080:8080"
|
|
networks:
|
|
- internal
|
|
|
|
volumes:
|
|
database:
|
|
driver: local
|
|
|
|
networks:
|
|
internal: {}
|