public-health-ch/ansible/roles/web/templates/docker-compose.j2

37 lines
962 B
Text
Raw Normal View History

2017-04-24 12:22:51 +00:00
web:
build: .
dockerfile: .dockerfile
command: gunicorn {{ django_project_name }}.wsgi:application -b 0.0.0.0:5000 -w 5 --log-file=-
volumes:
- ./:/usr/src/app
- {{ django_log_dir }}:/var/log/wagtail
links:
- redis
- postgres
2017-05-03 21:52:06 +00:00
- elasticsearch
2017-04-24 12:22:51 +00:00
ports:
- "5000:5000"
environment:
- DJANGO_SETTINGS_MODULE={{ django_project_name }}.settings.production
- ALLOWED_HOSTS={{ domain }},{{ ipv4_addresses|join(':5000,') }}
- SECRET_KEY={{ django_secret_key }}
- MAILGUN_KEY={{ django_email_key }}
- MAILGUN_DOMAIN={{ django_email_domain }}
- MAILGUN_FROM={{ django_email_from }}
2017-09-20 12:38:53 +00:00
- DATABASE_URL={{ django_postgres_url }}
2017-04-24 12:22:51 +00:00
- ELASTICSEARCH_URL=http://elasticsearch:9200
- REDIS_URL=redis://redis:6379
- LOG_DIR=/var/log/wagtail
redis:
image: redis
ports:
2017-04-24 12:56:57 +00:00
- "6379:6379"
2017-04-24 12:22:51 +00:00
postgres:
image: postgres
ports:
2017-04-24 12:56:57 +00:00
- "5432:5432"
2017-04-24 12:22:51 +00:00
elasticsearch:
2017-05-03 21:52:06 +00:00
image: elasticsearch:2
2017-04-24 12:22:51 +00:00
ports:
2017-04-24 12:56:57 +00:00
- "9200:9200"