2016-03-03 07:16:25 +03:00
|
|
|
version: '2'
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres:9.5
|
|
|
|
volumes:
|
|
|
|
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
|
|
|
env_file: .env
|
2015-07-16 18:43:02 +03:00
|
|
|
|
2016-03-03 07:16:25 +03:00
|
|
|
django:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
user: django
|
|
|
|
links:
|
|
|
|
- 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
|
|
|
|
links:
|
|
|
|
- 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
|
|
|
|
links:
|
|
|
|
- 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
|
|
|
|
links:
|
|
|
|
- postgres
|
|
|
|
- redis
|
|
|
|
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
- redis
|
|
|
|
{% endif %}
|