diff options
Diffstat (limited to 'roles/backup-notifications')
-rw-r--r-- | roles/backup-notifications/tasks/main.yml | 22 | ||||
-rw-r--r-- | roles/backup-notifications/templates/docker-compose.yml.j2 | 14 |
2 files changed, 36 insertions, 0 deletions
diff --git a/roles/backup-notifications/tasks/main.yml b/roles/backup-notifications/tasks/main.yml new file mode 100644 index 0000000..c649b2e --- /dev/null +++ b/roles/backup-notifications/tasks/main.yml @@ -0,0 +1,22 @@ +--- +- name: ensure backup-notifications docker/compose exist + file: + path: /etc/docker/compose/backup-notifications + state: directory + owner: root + group: root + mode: 0700 + +- name: build backup-notifications docker-compose.yml.j2 + template: + src: ../templates/docker-compose.yml.j2 + dest: /etc/docker/compose/backup-notifications/docker-compose.yml + owner: root + group: root + mode: u=rw,g=r,o=r + +- name: daemon-reload and enable backup-notifications + ansible.builtin.systemd_service: + state: restarted + enabled: true + name: docker-compose@backup-notifications diff --git a/roles/backup-notifications/templates/docker-compose.yml.j2 b/roles/backup-notifications/templates/docker-compose.yml.j2 new file mode 100644 index 0000000..79be2c9 --- /dev/null +++ b/roles/backup-notifications/templates/docker-compose.yml.j2 @@ -0,0 +1,14 @@ +version: "3" + +services: + backup-notify: + image: git.simponic.xyz/simponic/backup-notify:latest + healthcheck: + test: ["CMD", "wget", "--spider", "http://localhost:8080/health"] + interval: 5s + timeout: 10s + retries: 5 + ports: + - "127.0.0.1:31152:8080" + volumes: + - ./db:/app/db |