Created
January 21, 2019 11:25
-
-
Save toanalien/929ed8e24c8bb5f8f8d88af16d231544 to your computer and use it in GitHub Desktop.
xxx project docker-compose file with bundle: django app, postgres, adminer (database web gui), rabbitmq, celery for worker process, flower (celery gui)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
rabbitmq: | |
image: rabbitmq:3 | |
hostname: rabbit | |
postgres: | |
image: postgres:10 | |
restart: always | |
environment: | |
- POSTGRES_PASSWORD=123456 | |
- POSTGRES_DB=xxx | |
adminer: | |
image: adminer | |
restart: always | |
ports: | |
- 8080:8080 | |
python-app: | |
build: . | |
volumes: | |
- .:/opt/app/src | |
ports: | |
- 8000:8000 | |
env_file: | |
- "dev.env" | |
depends_on: | |
- rabbitmq | |
- postgres | |
command: gunicorn --bind :8000 xxx.wsgi:application | |
celery: | |
build: . | |
command: celery -A xxx worker -l debug | |
env_file: | |
- "dev.env" | |
volumes: | |
- .:/opt/app/src | |
depends_on: | |
- rabbitmq | |
- postgres | |
flower: | |
build: . | |
command: celery flower -A xxx --address=0.0.0.0 --port=5555 | |
volumes: | |
- .:/opt/app/src | |
env_file: | |
- "dev.env" | |
ports: | |
- 5555:5555 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment