From cfa23d359c568e18c1ce3e049897fd14295c65bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Thu, 10 Nov 2022 20:19:47 +0100 Subject: [PATCH] WIP. --- playbook.yml | 1 + roles/docker/tasks/services/glitchtip.yml | 56 +++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 roles/docker/tasks/services/glitchtip.yml diff --git a/playbook.yml b/playbook.yml index 5d2e430..0e5613b 100644 --- a/playbook.yml +++ b/playbook.yml @@ -27,6 +27,7 @@ - portainer - mastodon - membersystem + - glitchtip smtp_host: "postfix" smtp_port: "587" diff --git a/roles/docker/tasks/services/glitchtip.yml b/roles/docker/tasks/services/glitchtip.yml new file mode 100644 index 0000000..2117247 --- /dev/null +++ b/roles/docker/tasks/services/glitchtip.yml @@ -0,0 +1,56 @@ +--- + +- 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 + restart: unless-stopped + user: $UID:$GID + tty: true + ports: + - "8000:8000" + 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 }}" + VIRTUAL_HOST: "{{ membersystem.domain }}" + LETSENCRYPT_HOST: "{{ membersystem.domain }}" + LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" + ALLOWED_HOSTS: "member.data.coop" + CSRF_TRUSTED_ORIGINS: "https://member.data.coop" + DJANGO_ADMINS: "{{ membersystem.django_admins }}" + DEFAULT_FROM_EMAIL: "noreply@{{ membersystem.domain }}" + labels: + com.centurylinklabs.watchtower.enable: "true" + + postgres: + image: postgres:13-alpine + volumes: + - "{{ volume_root_folder }}/membersystem/postgres/data:/var/lib/postgresql/data" + ports: + - 5432:5432 + networks: + - membersystem + environment: + POSTGRES_PASSWORD: "{{ postgres_passwords.membersystem }}" + + networks: + membersystem: + external_services: + external: true + postfix: + external: true