2016-03-03 04:16:25 +00:00
|
|
|
version: '2'
|
2016-04-08 06:31:02 +00:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres_data: {}
|
|
|
|
|
postgres_backup: {}
|
|
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
services:
|
|
|
|
|
postgres:
|
2016-03-08 09:48:31 +00:00
|
|
|
build: ./compose/postgres
|
2016-03-03 04:16:25 +00:00
|
|
|
volumes:
|
2016-04-08 06:31:02 +00:00
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
- postgres_backup:/backups
|
2016-03-03 04:16:25 +00:00
|
|
|
env_file: .env
|
2015-07-16 15:43:02 +00:00
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
django:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
2016-03-23 19:45:09 +00:00
|
|
|
dockerfile: ./compose/django/Dockerfile
|
2016-03-03 04:16:25 +00:00
|
|
|
user: django
|
2016-03-08 09:12:55 +00:00
|
|
|
depends_on:
|
2016-03-03 04:16:25 +00:00
|
|
|
- postgres
|
|
|
|
|
- redis
|
|
|
|
|
command: /gunicorn.sh
|
|
|
|
|
env_file: .env
|
2015-07-16 15:43:02 +00:00
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
nginx:
|
|
|
|
|
build: ./compose/nginx
|
2016-03-08 09:12:55 +00:00
|
|
|
depends_on:
|
2016-03-03 04:16:25 +00:00
|
|
|
- django
|
|
|
|
|
ports:
|
|
|
|
|
- "0.0.0.0:80:80"
|
2015-07-16 15:43:02 +00:00
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
redis:
|
|
|
|
|
image: redis:3.0
|
|
|
|
|
{% if cookiecutter.use_celery == 'y' %}
|
|
|
|
|
celeryworker:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
2016-04-12 13:36:13 +00:00
|
|
|
dockerfile: ./compose/django/Dockerfile
|
2016-03-03 04:16:25 +00:00
|
|
|
user: django
|
|
|
|
|
env_file: .env
|
2016-03-08 09:12:55 +00:00
|
|
|
depends_on:
|
2016-03-03 04:16:25 +00:00
|
|
|
- postgres
|
|
|
|
|
- redis
|
2016-04-20 17:00:35 +00:00
|
|
|
command: celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO
|
2015-07-16 15:43:02 +00:00
|
|
|
|
2016-03-03 04:16:25 +00:00
|
|
|
celerybeat:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
2016-04-12 13:36:13 +00:00
|
|
|
dockerfile: ./compose/django/Dockerfile
|
2016-03-03 04:16:25 +00:00
|
|
|
user: django
|
|
|
|
|
env_file: .env
|
2016-03-08 09:12:55 +00:00
|
|
|
depends_on:
|
2016-03-03 04:16:25 +00:00
|
|
|
- postgres
|
|
|
|
|
- redis
|
2016-04-20 17:00:35 +00:00
|
|
|
command: celery -A {{cookiecutter.project_slug}}.taskapp beat -l INFO
|
2016-03-03 04:16:25 +00:00
|
|
|
{% endif %}
|