Last active
January 21, 2019 18:04
-
-
Save kennethreitz/85d73a60a7d4129058a5243c0d158e3f to your computer and use it in GitHub Desktop.
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: | |
postgres: | |
image: postgres | |
rabbit: | |
image: "rabbitmq:latest" | |
ports: | |
- "5672:5672" | |
web: | |
build: . | |
command: ["gunicorn", "bruceguts.http:app", "-k", "gevent", "-b", "0.0.0.0:80"] | |
ports: | |
- "8080:80" | |
depends_on: &services | |
- postgres | |
- rabbit | |
environment: &env | |
- CELERY_BROKER=amqp://rabbit | |
- DATABASE_URL=postgres://postgres:postgres@postgres:5432 | |
volumes: &code | |
- .:/app | |
worker: | |
build: . | |
volumes: *code | |
command: ["celery", "-A", "bruceguts.tasks", "worker", "--loglevel=info"] | |
environment: *env | |
depends_on: *services | |
flower: | |
build: . | |
volumes: *code | |
command: ["celery", "flower", "-A", "bruceguts.tasks", "worker", "--loglevel=info", "--address=0.0.0.0", "--port=5555"] | |
ports: | |
- "5555:5555" | |
environment: *env | |
depends_on: *services |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment