2019-10-04 09:50:26 +00: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:
|
|
|
|
build:
|
|
|
|
context: .
|
2019-10-09 12:29:44 +00:00
|
|
|
image: docker.beryju.org/passbook/server:${SERVER_TAG:-latest}
|
2019-10-04 09:50:26 +00:00
|
|
|
command:
|
|
|
|
- uwsgi
|
2019-10-04 10:45:19 +00:00
|
|
|
- uwsgi.ini
|
2019-10-04 09:50:26 +00:00
|
|
|
environment:
|
2019-10-09 12:30:53 +00:00
|
|
|
- PASSBOOK_DOMAIN=${PASSBOOK_DOMAIN}
|
2019-10-04 09:50:26 +00:00
|
|
|
- PASSBOOK_REDIS__HOST=redis
|
|
|
|
- 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:
|
2019-10-09 12:29:44 +00:00
|
|
|
image: docker.beryju.org/passbook/server:${SERVER_TAG:-latest}
|
2019-10-04 09:50:26 +00:00
|
|
|
command:
|
2019-10-09 12:29:44 +00:00
|
|
|
- celery
|
2019-10-04 09:50:26 +00:00
|
|
|
- worker
|
2019-10-09 12:29:44 +00:00
|
|
|
- --autoscale=10,3
|
|
|
|
- -E
|
|
|
|
- -B
|
|
|
|
- -A=passbook.root.celery
|
2019-10-04 09:50:26 +00:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
labels:
|
|
|
|
- traefik.enable=false
|
|
|
|
environment:
|
2019-10-09 12:30:53 +00:00
|
|
|
- PASSBOOK_DOMAIN=${PASSBOOK_DOMAIN}
|
2019-10-04 09:50:26 +00:00
|
|
|
- PASSBOOK_REDIS__HOST=redis
|
|
|
|
- PASSBOOK_POSTGRESQL__HOST=postgresql
|
|
|
|
- PASSBOOK_POSTGRESQL__PASSWORD=${PG_PASS:-thisisnotagoodpassword}
|
|
|
|
static:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: static.Dockerfile
|
2019-10-09 12:29:44 +00:00
|
|
|
image: docker.beryju.org/passbook/static:latest
|
2019-10-04 09:50:26 +00:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
labels:
|
2019-10-04 10:01:38 +00:00
|
|
|
- traefik.frontend.rule=PathPrefix:/static, /robots.txt
|
2019-10-04 09:50:26 +00:00
|
|
|
- traefik.port=80
|
|
|
|
- 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: {}
|