mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-25 19:13:08 +00:00
commit
5bb08d9522
6 changed files with 114 additions and 0 deletions
|
@ -75,6 +75,7 @@ Ansible config and a bunch of Docker containers.
|
||||||
* [Ombi](https://ombi.io/) - web application that automatically gives your users the ability to request content
|
* [Ombi](https://ombi.io/) - web application that automatically gives your users the ability to request content
|
||||||
* [Organizr](https://organizr.app/) - ORGANIZR aims to be your one stop shop for your Servers Frontend.
|
* [Organizr](https://organizr.app/) - ORGANIZR aims to be your one stop shop for your Servers Frontend.
|
||||||
* [openHAB](https://www.openhab.org/) - A vendor and technology agnostic open source automation software for your home
|
* [openHAB](https://www.openhab.org/) - A vendor and technology agnostic open source automation software for your home
|
||||||
|
* [Piwigo](https://piwigo.org/) - Photo Gallery Software
|
||||||
* [Plex](https://www.plex.tv/) - Plex Media Server
|
* [Plex](https://www.plex.tv/) - Plex Media Server
|
||||||
* [Portainer](https://portainer.io/) - for managing Docker and running custom images
|
* [Portainer](https://portainer.io/) - for managing Docker and running custom images
|
||||||
* [Prowlarr](https://github.com/Prowlarr/Prowlarr) - Indexer aggregator for Sonarr, Radarr, Lidarr, etc.
|
* [Prowlarr](https://github.com/Prowlarr/Prowlarr) - Indexer aggregator for Sonarr, Radarr, Lidarr, etc.
|
||||||
|
|
29
docs/applications/piwigo.md
Normal file
29
docs/applications/piwigo.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Piwigo - Open Source Photo Gallery
|
||||||
|
|
||||||
|
Homepage: [Piwigo.org](https://piwigo.org)
|
||||||
|
|
||||||
|
Piwigo is open source photo gallery software for the web. Designed for organisations, teams and individuals.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Set `piwigo_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
|
||||||
|
|
||||||
|
If you want to access Piwigo externally, set `piwigo_available_externally: "true"` in your `inventories/<your_inventory>/nas.yml` file.
|
||||||
|
|
||||||
|
The Piwigo web interface can be found at http://ansible_nas_host_or_ip:16923.
|
||||||
|
|
||||||
|
## Specific Configuration
|
||||||
|
|
||||||
|
Optional configurations:
|
||||||
|
|
||||||
|
- Set `piwigo_mysql_user` in `inventories/<your_inventory>/group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo".
|
||||||
|
- Set `piwigo_mysql_password` in `inventories/<your_inventory>/group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo".
|
||||||
|
- Set `piwigo_mysql_root_password` in `inventories/<your_inventory>/group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo".
|
||||||
|
|
||||||
|
- On first run you'll need to enter database details:
|
||||||
|
- Host: `db:3306`
|
||||||
|
- Username: the value of piwigo_mysql_user, defaults to "piwigo"
|
||||||
|
- Password: the value of piwigo_password, defaults to "piwigo"
|
||||||
|
- Database Name: `piwigo`
|
||||||
|
- Database tables prefix: should be prefilled with `piwigo_`
|
||||||
|
|
|
@ -57,6 +57,7 @@ By default, applications can be found on the ports listed below.
|
||||||
| openHAB | 7778 | Host | HTTPS |
|
| openHAB | 7778 | Host | HTTPS |
|
||||||
| Organizr | 10081 | Bridge | HTTP |
|
| Organizr | 10081 | Bridge | HTTP |
|
||||||
| Organizr | 10444 | Bridge | HTTPS |
|
| Organizr | 10444 | Bridge | HTTPS |
|
||||||
|
| Piwigo | 16923 | Bridge | HTTP |
|
||||||
| Plex | 32400 | Bridge | HTTP |
|
| Plex | 32400 | Bridge | HTTP |
|
||||||
| Portainer | 9000 | Bridge | HTTP |
|
| Portainer | 9000 | Bridge | HTTP |
|
||||||
| Prowlarr | 9696 | Bridge | HTTP |
|
| Prowlarr | 9696 | Bridge | HTTP |
|
||||||
|
|
5
nas.yml
5
nas.yml
|
@ -283,6 +283,11 @@
|
||||||
- dokuwiki
|
- dokuwiki
|
||||||
when: (dokuwiki_enabled | default(False))
|
when: (dokuwiki_enabled | default(False))
|
||||||
|
|
||||||
|
- role: piwigo
|
||||||
|
tags:
|
||||||
|
- piwigo
|
||||||
|
when: (piwigo_enabled | default(False))
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- import_tasks: tasks/thelounge.yml
|
- import_tasks: tasks/thelounge.yml
|
||||||
when: (thelounge_enabled | default(False))
|
when: (thelounge_enabled | default(False))
|
||||||
|
|
27
roles/piwigo/defaults/main.yml
Normal file
27
roles/piwigo/defaults/main.yml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
piwigo_enabled: false
|
||||||
|
piwigo_available_externally: "false"
|
||||||
|
|
||||||
|
# directories
|
||||||
|
piwigo_config_directory: "{{ docker_home }}/piwigo/config"
|
||||||
|
piwigo_data_directory: "{{ docker_home }}/piwigo/data"
|
||||||
|
piwigo_photos: "{{ photos_root }}/piwigo"
|
||||||
|
|
||||||
|
# uid / gid
|
||||||
|
piwigo_user_id: "0"
|
||||||
|
piwigo_group_id: "0"
|
||||||
|
piwigo_mysql_user: "piwigo"
|
||||||
|
piwigo_mysql_password: "piwigo"
|
||||||
|
piwigo_mysql_root_password: "piwigo"
|
||||||
|
|
||||||
|
piwigo_photos_permission: "rw"
|
||||||
|
|
||||||
|
# network
|
||||||
|
piwigo_hostname: "piwigo"
|
||||||
|
piwigo_port: "16923"
|
||||||
|
|
||||||
|
# specs
|
||||||
|
piwigo_memory: "1g"
|
||||||
|
piwigo_mysql_memory: "1g"
|
||||||
|
|
||||||
|
piwigo_version: "docker"
|
51
roles/piwigo/tasks/main.yml
Normal file
51
roles/piwigo/tasks/main.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
---
|
||||||
|
- name: Create Piwigo Directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
with_items:
|
||||||
|
- "{{ piwigo_config_directory }}"
|
||||||
|
- "{{ piwigo_data_directory }}"
|
||||||
|
- "{{ piwigo_photos }}"
|
||||||
|
|
||||||
|
- name: create MySQL container for Piwigo
|
||||||
|
docker_container:
|
||||||
|
name: piwigo-mysql
|
||||||
|
image: mysql:5.7
|
||||||
|
pull: true
|
||||||
|
volumes:
|
||||||
|
- "{{ piwigo_data_directory }}/mysql:/var/lib/mysql:rw"
|
||||||
|
env:
|
||||||
|
MYSQL_DATABASE: "piwigo"
|
||||||
|
MYSQL_USER: "{{ piwigo_mysql_user }}"
|
||||||
|
MYSQL_PASSWORD: "{{ piwigo_mysql_password }}"
|
||||||
|
MYSQL_ROOT_PASSWORD: "{{ piwigo_mysql_root_password }}"
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
memory: "{{ piwigo_mysql_memory }}"
|
||||||
|
|
||||||
|
- name: Piwigo Docker Container
|
||||||
|
docker_container:
|
||||||
|
name: piwigo
|
||||||
|
image: linuxserver/piwigo
|
||||||
|
pull: true
|
||||||
|
volumes:
|
||||||
|
- "{{ piwigo_config_directory }}:/config:rw"
|
||||||
|
- "{{ piwigo_photos }}:/gallery:rw"
|
||||||
|
links:
|
||||||
|
- piwigo-mysql:db
|
||||||
|
ports:
|
||||||
|
- "{{ piwigo_port }}:80"
|
||||||
|
env:
|
||||||
|
TZ: "{{ ansible_nas_timezone }}"
|
||||||
|
PUID: "{{ piwigo_user_id }}"
|
||||||
|
PGID: "{{ piwigo_group_id }}"
|
||||||
|
VERSION: "{{ piwigo_version }}"
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
memory: "{{ piwigo_memory }}"
|
||||||
|
labels:
|
||||||
|
traefik.enable: "{{ piwigo_available_externally }}"
|
||||||
|
traefik.http.routers.piwigo.rule: "Host(`{{ piwigo_hostname }}.{{ ansible_nas_domain }}`)"
|
||||||
|
traefik.http.routers.piwigo.tls.certresolver: "letsencrypt"
|
||||||
|
traefik.http.routers.piwigo.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||||
|
traefik.http.routers.piwigo.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||||
|
traefik.http.services.piwigo.loadbalancer.server.port: "80"
|
Loading…
Reference in a new issue