diff --git a/README.md b/README.md index 8f26199d..1e4b2189 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,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 * [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 +* [Piwigo](https://piwigo.org/) - Photo Gallery Software * [Plex](https://www.plex.tv/) - Plex Media Server * [Portainer](https://portainer.io/) - for managing Docker and running custom images * [pyLoad](https://pyload.net/) - A download manager with a friendly web-interface diff --git a/docs/applications/piwigo.md b/docs/applications/piwigo.md new file mode 100644 index 00000000..11e78658 --- /dev/null +++ b/docs/applications/piwigo.md @@ -0,0 +1,33 @@ +# 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//nas.yml` file. + +If you want to access Piwigo externally, set `piwigo_available_externally: "true"` in your `inventories//nas.yml` file. + +The Piwigo web interface can be found at http://ansible_nas_host_or_ip:16923. + +## Specific Configuration + +piwigo_mysql_user: "piwigo" +piwigo_mysql_password: "piwigo" +piwigo_mysql_root_password: "piwigo" +nventories/alfheim/group_vars/nas.yml +Optional configurations: + + - Set `piwigo_mysql_user` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". + - Set `piwigo_mysql_password` in `inventories//group_vars/nas.yml` before installing Piwigo, this defaults to "piwigo". + - Set `piwigo_mysql_root_password` in `inventories//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_` + diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index 2944a814..572a0f16 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -56,6 +56,7 @@ By default, applications can be found on the ports listed below. | openHAB | 7778 | Host | HTTPS | | Organizr | 10081 | Bridge | HTTP | | Organizr | 10444 | Bridge | HTTPS | +| Piwigo | 16923 | Bridge | HTTP | | Plex | 32400 | Bridge | HTTP | | Portainer | 9000 | Bridge | HTTP | | pyload | 8000 | Bridge | HTTP | diff --git a/roles/piwigo/defaults/main.yml b/roles/piwigo/defaults/main.yml index c9aabe68..7ab80125 100644 --- a/roles/piwigo/defaults/main.yml +++ b/roles/piwigo/defaults/main.yml @@ -5,11 +5,14 @@ piwigo_available_externally: "false" # directories piwigo_config_directory: "{{ docker_home }}/piwigo/config" piwigo_data_directory: "{{ docker_home }}/piwigo/data" -piwigo_photos: "{{ photos_root }}" +piwigo_photos: "{{ photos_root }}/piwigo" # uid / gid piwigo_user_id: "1000" piwigo_group_id: "1000" +piwigo_mysql_user: "piwigo" +piwigo_mysql_password: "piwigo" +piwigo_mysql_root_password: "piwigo" piwigo_photos_permission: "rw" diff --git a/roles/piwigo/tasks/main.yml b/roles/piwigo/tasks/main.yml index e0777eed..126cc44d 100644 --- a/roles/piwigo/tasks/main.yml +++ b/roles/piwigo/tasks/main.yml @@ -6,6 +6,7 @@ with_items: - "{{ piwigo_config_directory }}" - "{{ piwigo_data_directory }}" + - "{{ piwigo_photos }}" - name: create MySQL container for Piwigo docker_container: @@ -16,9 +17,9 @@ - "{{ piwigo_data_directory }}/mysql:/var/lib/mysql:rw" env: MYSQL_DATABASE: "piwigo" - MYSQL_USER: "piwigo" - MYSQL_PASSWORD: "piwigo" - MYSQL_ROOT_PASSWORD: "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 }}"