Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| services:pigallery2 [2024/08/26 13:51] – willy | services:pigallery2 [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== PiGallery2 ====== | ||
| - | |||
| - | **note:** i don't use this service anymore, so this page might be uotdated. | ||
| - | |||
| - | |||
| - | [[http:// | ||
| - | |||
| - | ===== Installing ===== | ||
| - | |||
| - | Create a **pigallery2** user belonging to group **photos**: | ||
| - | <code bash> | ||
| - | groupadd photos | ||
| - | useradd -d / | ||
| - | </ | ||
| - | |||
| - | Installing on bare-metal on Gentoo is not easy because some dependencies still require Python 2 (!!!) it seems. Going containers is currently the best approach. See [[gentoo: | ||
| - | |||
| - | Grab the docker-compose file and start it, be sure to grab the one without NGINX: | ||
| - | <code bash> | ||
| - | su - pigallery2 | ||
| - | wget https:// | ||
| - | </ | ||
| - | |||
| - | now edit it. Change the port from //80// to **3011** (of course, pick your preferred port!), and setup properly your folders. | ||
| - | |||
| - | Also, add the following lines to the end of the docker-compose file: | ||
| - | < | ||
| - | networks: | ||
| - | pigallery2-net: | ||
| - | </ | ||
| - | to segregate Pigallery2 to it's own subnetwork. | ||
| - | | ||
| - | It's installation time: | ||
| - | <code bash> | ||
| - | podman compose pull | ||
| - | </ | ||
| - | |||
| - | ==== NGINX reverse proxy ==== | ||
| - | |||
| - | The following NGINX config: | ||
| - | <file - photos.conf> | ||
| - | location /photos/ { | ||
| - | proxy_pass http:// | ||
| - | |||
| - | proxy_http_version 1.1; | ||
| - | proxy_set_header Upgrade $http_upgrade; | ||
| - | proxy_set_header Connection ' | ||
| - | proxy_set_header Host $host; | ||
| - | proxy_cache_bypass $http_upgrade; | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | You will be able to access your Pigallery2 on **https:// | ||
| - | Add it to your NGINX config and restart it. See [[selfhost: | ||
| - | |||
| - | ==== Starting and autostart on boot ==== | ||
| - | |||
| - | Following my [[gentoo: | ||
| - | <file - / | ||
| - | USER=pigallery2 | ||
| - | DESCRIPTION=" | ||
| - | </ | ||
| - | |||
| - | and create the link: | ||
| - | <code bash> | ||
| - | ln -s / | ||
| - | rc-update add user-containers.pigallery2 default | ||
| - | </ | ||
| - | |||
| - | To start it now: | ||
| - | <code bash> | ||
| - | rc-service user-containers.pigallery2 start | ||
| - | </ | ||
| - | |||
| - | And then want to shut it down manually: | ||
| - | < | ||
| - | rc-service user-containers.pigallery2 stop | ||
| - | </ | ||
| - | |||
| - | Remember you need to start it once and after you can edit the configuration file **/ | ||
| - | < | ||
| - | " | ||
| - | </ | ||
| - | |||
| - | to ensure Pigallery2 works with the new subpath. | ||
| - | |||
| - | |||
| - | |||