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