From 669279b4ed7326c7190e42aa80487d57c3317a13 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Fri, 9 Jun 2023 00:27:48 +0200 Subject: [PATCH] Migrate home_assistant + n8n + protonmail --- playbook.yml | 8 ++++---- .../templates/docker-compose.yml.j2 | 2 +- roles/n8n/templates/docker-compose.yml.j2 | 4 ++-- roles/protonmail/templates/docker-compose.yml.j2 | 16 +--------------- 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/playbook.yml b/playbook.yml index 7c184d1..6e09710 100644 --- a/playbook.yml +++ b/playbook.yml @@ -6,11 +6,11 @@ - { role: docker, tags: ["docker"] } - { role: ssh, tags: ["ssh"] } # - { role: traefik, tags: ["traefik"] } -# - { role: whoami, tags: ["whoami"] } -# - { role: protonmail, tags: ["protonmail"] } + - { role: whoami, tags: ["whoami"] } + - { role: protonmail, tags: ["protonmail"] } # - { role: cloud, tags: ["cloud"] } -# - { role: home_assistant, tags: ["home_assistant"] } -# - { role: n8n, tags: ["n8n"] } + - { role: home_assistant, tags: ["home_assistant"] } + - { role: n8n, tags: ["n8n"] } # - { role: matrix, tags: ["matrix"] } # - { role: iptables, tags: ["iptables"] } # - { role: clean, tags: ["clean"] } diff --git a/roles/home_assistant/templates/docker-compose.yml.j2 b/roles/home_assistant/templates/docker-compose.yml.j2 index e033599..023944d 100644 --- a/roles/home_assistant/templates/docker-compose.yml.j2 +++ b/roles/home_assistant/templates/docker-compose.yml.j2 @@ -8,7 +8,7 @@ services: environment: - TZ=Europe/Paris volumes: - - home_assistant_config:/config + - {{ server.work_dir }}/home_assistant/base:/config - /etc/localtime:/etc/localtime:ro network_mode: host expose: diff --git a/roles/n8n/templates/docker-compose.yml.j2 b/roles/n8n/templates/docker-compose.yml.j2 index 2d35442..d6b84a6 100644 --- a/roles/n8n/templates/docker-compose.yml.j2 +++ b/roles/n8n/templates/docker-compose.yml.j2 @@ -8,7 +8,7 @@ services: networks: - internal volumes: - - db:/var/lib/postgresql/data + - {{ server.work_dir }}/n8n/db:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=n8n - POSTGRES_DB=n8n @@ -22,7 +22,7 @@ services: - internal - proxy volumes: - - n8n:/home/node/.n8n + - {{ server.work_dir }}/n8n/base:/home/node/.n8n labels: - "traefik.enable=true" - "traefik.http.routers.n8n-secure.entrypoints=https" diff --git a/roles/protonmail/templates/docker-compose.yml.j2 b/roles/protonmail/templates/docker-compose.yml.j2 index 1e04703..4ef7426 100644 --- a/roles/protonmail/templates/docker-compose.yml.j2 +++ b/roles/protonmail/templates/docker-compose.yml.j2 @@ -8,21 +8,7 @@ services: networks: - protonmail volumes: - - protonmail:/root - - # BACKUP - backup_protonmail: - image: offen/docker-volume-backup:latest - restart: always - environment: - BACKUP_CRON_EXPRESSION: "{{ server.backup.cron_expression }}" - BACKUP_FILENAME: "{{ server.backup.filename_date_format }}-protonmail.tar.gz" - BACKUP_LATEST_SYMLINK: protonmail.latest.tar.gz - BACKUP_EXCLUDE_REGEXP: "\\.log$$" - BACKUP_RETENTION_DAYS: "{{ server.backup.retention_days }}" - volumes: - - protonmail:/backup:ro - - {{ server.backup.folder }}/protonmail:/archive + - {{ server.work_dir }}/protonmail/base:/root volumes: protonmail: