mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-11 20:28:01 +03:00
59 lines
1.1 KiB
YAML
59 lines
1.1 KiB
YAML
version: '2'
|
|
services:
|
|
postgres:
|
|
build: ./compose/postgres
|
|
volumes:
|
|
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
|
- /data/{{cookiecutter.repo_name}}/postgres-backups:/backups
|
|
env_file: .env
|
|
|
|
django:
|
|
build:
|
|
context: .
|
|
user: django
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: /gunicorn.sh
|
|
env_file: .env
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
|
|
nginx:
|
|
build: ./compose/nginx
|
|
depends_on:
|
|
- django
|
|
ports:
|
|
- "0.0.0.0:80:80"
|
|
|
|
redis:
|
|
image: redis:3.0
|
|
{% if cookiecutter.use_celery == 'y' %}
|
|
celeryworker:
|
|
build:
|
|
context: .
|
|
user: django
|
|
env_file: .env
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: celery -A {{cookiecutter.repo_name}}.taskapp worker -l INFO
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
|
|
celerybeat:
|
|
build:
|
|
context: .
|
|
user: django
|
|
env_file: .env
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
{% endif %}
|