Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (64 sloc) 1.83 KB
---
version: '3'
services:
db:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
web:
build: .
working_dir: /code/carbalert
command: gunicorn carbalert.wsgi -b 0.0.0.0:8000
volumes:
- "/static:/static"
ports:
- "8000:8000"
depends_on:
- db
celery_worker:
build: .
working_dir: /code
command: celery -A carbalert.carbalert_scrapy.carbalert_scrapy.tasks worker --loglevel=info -f celery_worker.log --max-tasks-per-child 1 --email "${MAILGUN_EMAIL}" --key ${MAILGUN_API_KEY} --domain ${MAILGUN_DOMAIN}
volumes:
- .:/code
depends_on:
- web
- redis
environment:
- SCRAPY_SETTINGS_MODULE=carbalert.carbalert_scrapy.carbalert_scrapy.settings
celery_beat:
build: .
working_dir: /code
command: celery -A carbalert.carbalert_scrapy.carbalert_scrapy.tasks beat --loglevel=info -f celery_beat.log
volumes:
- .:/code
depends_on:
- celery_worker
celery_flower:
build: .
working_dir: /code
command: celery -A carbalert.carbalert_scrapy.carbalert_scrapy.tasks flower --loglevel=debug --auth_provider=flower.views.auth.GithubLoginHandler --auth=${FLOWER_OAUTH2_EMAIL} --oauth2_key=${FLOWER_OAUTH2_KEY} --oauth2_secret=${FLOWER_OAUTH2_SECRET} --oauth2_redirect_uri=${FLOWER_OAUTH2_REDIRECT_URI} --url_prefix=flower
ports:
- "5555:5555"
depends_on:
- celery_worker
redis:
container_name: 'redis'
image: 'redis:3.2.0'
ports:
- '127.0.0.1:6379:6379'
# Uncomment below for local dev set-up
# nginx:
# restart: always
# container_name: nginx_server
# build:
# context: ./nginx-docker/
# dockerfile: Dockerfile
# depends_on:
# - celery_flower
# ports:
# - "0.0.0.0:80:80"
# volumes:
# - "/static:/static"
volumes:
postgres_data: