mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-24 02:24:07 +03:00
67 lines
1.2 KiB
YAML
67 lines
1.2 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
|
|
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: .
|
|
dockerfile: ./compose/django/Dockerfile
|
|
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: .
|
|
dockerfile: ./compose/django/Dockerfile
|
|
user: django
|
|
env_file: .env
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
{% endif %}
|