From f71d534afe1755375d8a93f8e5e2b77a8b96da7a Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Mon, 7 Nov 2022 18:38:08 +0100 Subject: [PATCH] Add Rallly --- group_vars/all/secrets.yml.contents | 1 + playbook.yml | 1 + roles/docker/defaults/main.yml | 7 +++- roles/docker/tasks/services/rallly.yml | 52 ++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 roles/docker/tasks/services/rallly.yml diff --git a/group_vars/all/secrets.yml.contents b/group_vars/all/secrets.yml.contents index 4dd87546..7188ffa0 100644 --- a/group_vars/all/secrets.yml.contents +++ b/group_vars/all/secrets.yml.contents @@ -12,6 +12,7 @@ postgres_passwords: ttrss: xxx keycloak: xxx mastodon: xxx + rallly: xxx membersystem: xxx fider_jwt_secret: xxx diff --git a/playbook.yml b/playbook.yml index 5d2e4302..fe577fc0 100644 --- a/playbook.yml +++ b/playbook.yml @@ -26,6 +26,7 @@ - mailu - portainer - mastodon + - rallly - membersystem smtp_host: "postfix" diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 524cbb2c..e890544d 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -101,12 +101,17 @@ postfix: - "{{ passit.domain }}" - "{{ gitea.domain }}" - "{{ mastodon.domain }}" + - "{{ rallly.domain }}" - "{{ membersystem.domain }}" mastodon: domain: "social.{{ base_domain }}" volume_folder: "{{ volume_root_folder }}/mastodon" +rallly: + domain: "when.{{ base_domain }}" + volume_folder: "{{ volume_root_folder }}/rallly" + membersystem: domain: "member.{{ base_domain }}" django_admins: "Vidir:valberg@orn.li" @@ -114,4 +119,4 @@ membersystem: restic: user: "datacoop" domain: "restic.cannedtuna.org" - repository: "datacoop-hevonen" \ No newline at end of file + repository: "datacoop-hevonen" diff --git a/roles/docker/tasks/services/rallly.yml b/roles/docker/tasks/services/rallly.yml new file mode 100644 index 00000000..ab554e51 --- /dev/null +++ b/roles/docker/tasks/services/rallly.yml @@ -0,0 +1,52 @@ +- name: create rallly volume folders + file: + name: "{{ rallly.volume_folder }}/postgres" + state: directory + +- name: set up rallly + docker_compose: + project_name: "rallly" + pull: "yes" + definition: + version: "3.8" + services: + postgres: + image: "postgres:14-alpine" + restart: "unless-stopped" + shm_size: "256mb" + networks: + rallly_internal: + volumes: + - "{{ rallly.volume_folder }}/postgres:/var/lib/postgresql/data" + environment: + POSTGRES_PASSWORD: "{{ postgres_passwords.rallly }}" + POSTGRES_DB: "rallly_db" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 5s + timeout: 5s + retries: 5 + labels: + com.centurylinklabs.watchtower.enable: "true" + + rallly: + image: "lukevella/rallly:latest" + restart: "unless-stopped" + networks: + rallly_internal: + external_services: + ports: + - "3000:3000" + environment: + DATABASE_URL: "postgres://postgres:{{ postgres_passwords.rallly }}@postgres:5432/rallly_db" + depends_on: + rallly_db: + condition: "service_healthy" + labels: + com.centurylinklabs.watchtower.enable: "true" + + networks: + rallly_internal: + internal: true + external_services: + external: true