datacoop.ansible/roles/docker/tasks/services/membersystem.yml

52 lines
1.7 KiB
YAML
Raw Normal View History

2022-08-09 11:50:49 +00:00
---
- name: run membersystem containers
docker_compose:
project_name: "member.data.coop"
pull: yes
definition:
version: "3"
services:
backend:
image: docker.data.coop/member.data.coop:latest
2022-08-09 11:50:49 +00:00
restart: unless-stopped
user: $UID:$GID
tty: true
depends_on:
- postgres
networks:
- membersystem
- external_services
- postfix
environment:
SECRET_KEY: "{{ membersystem_secrets.secret_key }}"
DATABASE_URL: postgres://postgres:{{ postgres_passwords.membersystem }}@postgres:5432/postgres
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend"
EMAIL_URL: "smtp://noop@{{ smtp_host }}:{{ smtp_port }}"
2022-08-09 17:47:40 +00:00
VIRTUAL_HOST: "{{ membersystem.domain }}"
2022-11-10 18:32:39 +00:00
VIRTUAL_PORT: "8000"
2022-08-09 17:47:40 +00:00
LETSENCRYPT_HOST: "{{ membersystem.domain }}"
2022-08-09 11:50:49 +00:00
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
2022-11-10 18:32:39 +00:00
ALLOWED_HOSTS: "{{ membersystem.domain }}"
CSRF_TRUSTED_ORIGINS: "https://{{ membersystem.domain }}"
2022-08-09 17:47:40 +00:00
DJANGO_ADMINS: "{{ membersystem.django_admins }}"
DEFAULT_FROM_EMAIL: "noreply@{{ membersystem.domain }}"
2022-08-09 11:50:49 +00:00
postgres:
image: postgres:13-alpine
volumes:
- "{{ volume_root_folder }}/membersystem/postgres/data:/var/lib/postgresql/data"
networks:
- membersystem
environment:
POSTGRES_PASSWORD: "{{ postgres_passwords.membersystem }}"
networks:
membersystem:
external_services:
external: true
postfix:
external: true