Docker

HomeGallery offers docker image at xemle/home-gallery (amd64 and arm64 architecture). These image are build via GitHub actions.

Data volume structure

The gallery application is located at /app whereas the data is stored in /data within the container. The /data folder has following structure:

`-- /data - Docker data volume
  +-- sources - Your media file sources or other volumne mounts
  +-- config - File index, database and configuration files
  | `-- gallery.config.yml - Main configuration file
  `-- storage - Preview images and meta data

The media volumes should be mounted into the /data directory. Eg. mount your host directory ~/Pictures to /data/Pictures in the container and add it as source to your gallery.config.yml.

To avoid user permission problems it is advisable to run the container with your user and group id via -u parameter.

Quickstart

1mkdir -p data/config
2alias gallery="docker run -ti --rm \
3  -v $(pwd)/data:/data \
4  -v $HOME/Pictures:/data/Pictures \
5  -u $(id -u):$(id -g) \
6  -p 3000:3000 xemle/home-gallery"
7gallery run init --source /data/Pictures
8gallery run server

While your media files are imported open your HomeGallery at localhost:3000 in your browser.

Note

The docker container is configured to poll image sources each 5 minutes for compatibility reasons of slow or large media volumes. Check if inotify through disabled polling by GALLERY_WATCH_POLL_INTERVAL=0 is working for you.

Run the CLI

The CLI with all commands via docker is started by

1gallery -h

Custom image

You can customize and build the docker image by your own

git clone https://github.com/xemle/home-gallery.git
cd home-gallery
docker build -t home-gallery .