Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:homegallery [2024/03/18 13:53] – willy | services:homegallery [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== HomeGallery ====== | ||
- | [[https:// | ||
- | |||
- | It comes with Docker and bare-metal instructions, | ||
- | |||
- | The reverse-geocoding and AI stuff is accessed via public APIs on // | ||
- | |||
- | ===== Installation ===== | ||
- | |||
- | Full documentation is well maintained and csan be found [[https:// | ||
- | |||
- | Create a **homegallery** user as a memeber of the **photos** group: | ||
- | <code bash> | ||
- | useradd -d / | ||
- | su - homegallery | ||
- | curl -sL https:// | ||
- | chmod 755 gallery | ||
- | </ | ||
- | |||
- | Installing the API server is ismpler using a container, do use the following **docker-compose.yml**: | ||
- | <file - docker-compose.yml> | ||
- | version: " | ||
- | services: | ||
- | api: | ||
- | # custom build via | ||
- | #build: packages/ | ||
- | image: xemle/ | ||
- | environment: | ||
- | # TensorflowJS backends | ||
- | # - cpu: slowest and best support | ||
- | # - wasm: good perfromance for arm64 and amd64 platforms | ||
- | # - node: best performance on amd64 platform | ||
- | #- BACKEND=cpu | ||
- | #- BACKEND=wasm | ||
- | - BACKEND=node | ||
- | ports: | ||
- | - " | ||
- | </ | ||
- | |||
- | Note that you should not create a specific network for the API server to ensure it works with the non-containerized server. | ||
- | |||
- | Then the usual: | ||
- | <code bash> | ||
- | podman compose pull | ||
- | </ | ||
- | |||
- | ===== Configuration ===== | ||
- | |||
- | Full configuration is [[https:// | ||
- | |||
- | First of all, run // | ||
- | <code bash> | ||
- | ./gallery run init --source ~/Pictures | ||
- | </ | ||
- | |||
- | Now you can edit the **/ | ||
- | <file - gallery.config.yml> | ||
- | extractor: | ||
- | apiServer: | ||
- | url: http:// | ||
- | timeout: 30 | ||
- | concurrent: 5 | ||
- | |||
- | server: | ||
- | port: 3022 | ||
- | host: ' | ||
- | BasePath: /gallery/ | ||
- | </ | ||
- | |||
- | Please note that for **BasePath** to work, the trailing **/** is required! | ||
- | |||
- | |||
- | ===== Reverse Proxy ===== | ||
- | |||
- | Example NGINX configuration: | ||
- | <file - gallery.conf> | ||
- | location /gallery/ { | ||
- | 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; | ||
- | } | ||
- | </ | ||
- | |||
- | Refer to [[selfhost: | ||
- | |||
- | ===== Startup ===== | ||
- | |||
- | Create the following script **/ | ||
- | <file - homegallery.sh> | ||
- | #/bin/bash | ||
- | ./gallery run server | ||
- | </ | ||
- | |||
- | Start on boot, first start the container for the API server, add to your **/ | ||
- | <file - 80-containers.start> | ||
- | su - homegallery -c " | ||
- | </ | ||
- | |||
- | and | ||
- | |||
- | <file - 80-containers.stop> | ||
- | su - homegallery -c " | ||
- | </ | ||
- | |||
- | Then start the server with the script **/ | ||
- | <file - 81-homegallery.start> | ||
- | #!/bin/bash | ||
- | / | ||
- | </ | ||
- | |||
- | Ensure the server starts after the container. | ||
- | |||
- | Make the scripts executable! | ||
- | |||
- | |||
- | |||
- | ===== Upgrade ===== | ||
- | |||
- | See [[https:// | ||
- | |||
- | <code bash> | ||
- | kill gallery | ||
- | podman compose down | ||
- | podman compose pull | ||
- | mv gallery gallery.old | ||
- | curl -sL https:// | ||
- | chmod 755 gallery | ||
- | podman compose up -d | ||
- | ./gallery run import | ||
- | ./gallery run server & | ||
- | </ | ||
- | |||
- | |||
- | |||