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

45 lines
1.2 KiB
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
2020-05-15 09:40:27 +00:00
links:
- elasticsearch
2019-09-11 07:00:12 +00:00
# - postgres
2020-05-15 09:40:27 +00:00
# - redis
2017-04-24 12:22:51 +00:00
ports:
- "5000:5000"
environment:
- DJANGO_SETTINGS_MODULE={{ django_project_name }}.settings.production
2019-09-11 21:49:46 +00:00
- ALLOWED_HOSTS=www.{{ allowed_domains|join(',www.') }},{{ allowed_domains|join(',') }},{{ ipv4_addresses|join(':5000,') }}
2017-04-24 12:22:51 +00:00
- 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 }}
2020-05-15 09:40:27 +00:00
- ELASTICSEARCH_URL={{ django_elasticsearch_url }}
2019-09-11 07:00:12 +00:00
- REDIS_URL={{ django_redis_url }}
2017-04-24 12:22:51 +00:00
- LOG_DIR=/var/log/wagtail
2020-05-15 09:40:27 +00:00
elasticsearch:
image: elasticsearch:5
ports:
- "9200:9200"
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
mem_limit: 1g
2020-02-18 17:02:47 +00:00
2019-09-11 07:00:12 +00:00
# redis:
# image: redis
# command: ["redis-server", "--appendonly", "yes"]
# restart: on-failure
# volumes:
# - {{ redis_data_dir }}:/data
# ports:
# - "6379:6379"
# postgres:
# image: postgres
# ports:
# - "5432:5432"