Install gotify
This commit is contained in:
parent
9a770df6dc
commit
8a14b09ce8
3 changed files with 51 additions and 0 deletions
17
ansible/roles/docker/files/gotify/docker-compose.yml
Normal file
17
ansible/roles/docker/files/gotify/docker-compose.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
version: "2"
|
||||
services:
|
||||
duplicati:
|
||||
image: gotify/server:2.0.13
|
||||
container_name: gotify
|
||||
environment:
|
||||
- PUID=3000
|
||||
- PGID=3000
|
||||
- TZ=Europe/London
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.gotify.rule=Host(`gotify.jakehoward.tech`)"
|
||||
- "traefik.http.routers.gotify.tls=true"
|
||||
- "traefik.http.routers.gotify.tls.certresolver=le"
|
31
ansible/roles/docker/tasks/gotify.yml
Normal file
31
ansible/roles/docker/tasks/gotify.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
- name: Create gotify directory
|
||||
file:
|
||||
path: '/opt/gotify'
|
||||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
become_user: root
|
||||
|
||||
- name: Install gotify compose file
|
||||
template:
|
||||
src: files/gotify/docker-compose.yml
|
||||
dest: "/opt/gotify/docker-compose.yml"
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
validate: /usr/bin/docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
become_user: root
|
||||
|
||||
- name: Cycle gotify container
|
||||
docker_compose:
|
||||
project_src: /opt/gotify
|
||||
pull: true
|
||||
remove_orphans: true
|
||||
remove_volumes: true
|
||||
state: "{{ item }}"
|
||||
when: compose_file.changed
|
||||
loop:
|
||||
- absent
|
||||
- present
|
|
@ -24,3 +24,6 @@
|
|||
|
||||
- name: Install librespeed
|
||||
include: librespeed.yml
|
||||
|
||||
- name: Install gotify
|
||||
include: gotify.yml
|
||||
|
|
Loading…
Reference in a new issue