Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Piwigo #63

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions roles/piwigo/README.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions roles/piwigo/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subdomain_jellyfin: piwigo
7 changes: 7 additions & 0 deletions roles/piwigo/tasks/backup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Backup piwigo
ansible.builtin.include_role:
name: lokal
tasks_from: backup
vars:
app: piwigo
10 changes: 10 additions & 0 deletions roles/piwigo/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Install piwigo
include_role:
name: lokal
tasks_from: install
vars:
app: piwigo
data_dirs:
- data
- config
8 changes: 8 additions & 0 deletions roles/piwigo/tasks/remove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: Remove piwigo
ansible.builtin.include_role:
name: lokal
tasks_from: remove
vars:
app: piwigo
firewall: false
7 changes: 7 additions & 0 deletions roles/piwigo/tasks/restore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Restore piwigo
ansible.builtin.include_role:
name: lokal
tasks_from: restore
vars:
app: piwigo
29 changes: 29 additions & 0 deletions roles/piwigo/templates/compose.yml.j2
Original file line number Diff line number Diff line change
@@ -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