diff --git a/roles/piwigo/README.md b/roles/piwigo/README.md new file mode 100644 index 0000000..26193a4 --- /dev/null +++ b/roles/piwigo/README.md @@ -0,0 +1,18 @@ +# Jellyfin + +Jellyfin is a video home server comparable to Netflix and others. We provide two ways of adding +content - via transmission client (https://torrent.{your-domain}) and by manual furnihing into +the `data` folder by default located on the server at `/opt/lokal/jellyfin/data` (where `/opt/lokal`) +is configurable by `project_root` variable thus can be found elsewhere. + +## Setup + +Unfortunatelly, you need to finish the installation manually because there is no +way of creating the admin account automatically. +After installation, go to `https://{subdomain_jellyfin}.{your-domain}/web/index.html#!/wizarduser.html` +to invoke the admininstration setup. Where jellyfin's default subdomain is `video`. + +## Connecting + +If it asks you to connect to a server, simply use `https://{subdomain_jellyfin}.{your-domain}` without +specifying any port as hinted in the prompt. \ No newline at end of file diff --git a/roles/piwigo/defaults/main.yml b/roles/piwigo/defaults/main.yml new file mode 100644 index 0000000..524b267 --- /dev/null +++ b/roles/piwigo/defaults/main.yml @@ -0,0 +1 @@ +subdomain_jellyfin: piwigo diff --git a/roles/piwigo/tasks/backup.yml b/roles/piwigo/tasks/backup.yml new file mode 100644 index 0000000..64e5501 --- /dev/null +++ b/roles/piwigo/tasks/backup.yml @@ -0,0 +1,7 @@ +--- +- name: Backup piwigo + ansible.builtin.include_role: + name: lokal + tasks_from: backup + vars: + app: piwigo diff --git a/roles/piwigo/tasks/main.yml b/roles/piwigo/tasks/main.yml new file mode 100644 index 0000000..e54dcc8 --- /dev/null +++ b/roles/piwigo/tasks/main.yml @@ -0,0 +1,10 @@ +--- +- name: Install piwigo + include_role: + name: lokal + tasks_from: install + vars: + app: piwigo + data_dirs: + - data + - config diff --git a/roles/piwigo/tasks/remove.yml b/roles/piwigo/tasks/remove.yml new file mode 100644 index 0000000..7525b09 --- /dev/null +++ b/roles/piwigo/tasks/remove.yml @@ -0,0 +1,8 @@ +--- +- name: Remove piwigo + ansible.builtin.include_role: + name: lokal + tasks_from: remove + vars: + app: piwigo + firewall: false diff --git a/roles/piwigo/tasks/restore.yml b/roles/piwigo/tasks/restore.yml new file mode 100644 index 0000000..9269b21 --- /dev/null +++ b/roles/piwigo/tasks/restore.yml @@ -0,0 +1,7 @@ +--- +- name: Restore piwigo + ansible.builtin.include_role: + name: lokal + tasks_from: restore + vars: + app: piwigo diff --git a/roles/piwigo/templates/compose.yml.j2 b/roles/piwigo/templates/compose.yml.j2 new file mode 100644 index 0000000..03b00bd --- /dev/null +++ b/roles/piwigo/templates/compose.yml.j2 @@ -0,0 +1,29 @@ +version: "3.8" +services: + piwigo: + image: lscr.io/linuxserver/piwigo:latest + container_name: piwigo + environment: + PUID: 1000 + PGID: 1000 + TZ: '{{tz}}' + PIWIGO_PublishedServerUrl: https://{{subdomain_piwigo}}.{{domain}} + volumes: + - "{{project_root}}/piwigo/config:/config" + - "{{project_root}}/piwigo/data:/gallery" + restart: unless-stopped + labels: + traefik.enable: "true" + traefik.http.routers.piwigo.entrypoints: websecure + traefik.http.routers.piwigo.rule: Host(`{{subdomain_piwigo}}.{{domain}}`) + traefik.http.routers.piwigo.tls: "true" + traefik.http.services.piwigo.loadbalancer.server.port: 80 +{% if ssl_use_acme %} + traefik.http.routers.piwigo.tls.certresolver: {{cert_resolver}} +{% endif %} + networks: + - traefik + +networks: + traefik: + external: true