mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-29 21:14:03 +03:00
58 lines
1.1 KiB
YAML
58 lines
1.1 KiB
YAML
version: '2'
|
|
|
|
volumes:
|
|
postgres_data: {}
|
|
postgres_backup: {}
|
|
|
|
services:
|
|
postgres:
|
|
build: ./compose/postgres
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- postgres_backup:/backups
|
|
env_file: .env
|
|
|
|
django:
|
|
build:
|
|
context: .
|
|
dockerfile: ./compose/django/Dockerfile
|
|
user: django
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: /gunicorn.sh
|
|
env_file: .env
|
|
|
|
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: .
|
|
dockerfile: ./compose/django/Dockerfile
|
|
user: django
|
|
env_file: .env
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO
|
|
|
|
celerybeat:
|
|
build:
|
|
context: .
|
|
dockerfile: ./compose/django/Dockerfile
|
|
user: django
|
|
env_file: .env
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: celery -A {{cookiecutter.project_slug}}.taskapp beat -l INFO
|
|
{% endif %}
|