mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-23 18:14:01 +03:00
c7ea475f06
- removed env.production and added a env.example that should be renamed to `.env` (not tracked by default) - Refactored docker-compose.yml * adding user to django, celeryworker, celerybeat so that we got rid of the `su` hack * removed rabbitmq - Refactored Dockerfile - Refactored `entrypoint.sh` and added inline documentation - Removed `su` hack from gunicorn.sh - Added documentation
43 lines
732 B
YAML
43 lines
732 B
YAML
postgres:
|
|
image: postgres:9.4
|
|
volumes:
|
|
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
|
env_file: .env
|
|
|
|
django:
|
|
build: .
|
|
user: django
|
|
links:
|
|
- postgres
|
|
- redis
|
|
command: /gunicorn.sh
|
|
env_file: .env
|
|
|
|
nginx:
|
|
build: ./compose/nginx
|
|
links:
|
|
- django
|
|
ports:
|
|
- "0.0.0.0:80:80"
|
|
|
|
redis:
|
|
image: redis:3.0
|
|
{% if cookiecutter.use_celery == 'y' %}
|
|
celeryworker:
|
|
build: .
|
|
user: django
|
|
env_file: .env
|
|
links:
|
|
- postgres
|
|
- redis
|
|
command: celery -A {{cookiecutter.repo_name}}.taskapp worker -l INFO
|
|
|
|
celerybeat:
|
|
build: .
|
|
user: django
|
|
env_file: .env
|
|
links:
|
|
- postgres
|
|
- redis
|
|
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
|
|
{% endif %} |