Install gotify

This commit is contained in:
Jake Howard 2020-02-02 20:22:23 +00:00
parent 9a770df6dc
commit 8a14b09ce8
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 51 additions and 0 deletions

View 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"

View 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

View file

@ -24,3 +24,6 @@
- name: Install librespeed - name: Install librespeed
include: librespeed.yml include: librespeed.yml
- name: Install gotify
include: gotify.yml