📖 Advanced docker-compose usage
PostgreSQL v18+ Volume Mount Change
With Postgres v18+, mounting a volume to /var/lib/postgresql/data can fail in Docker/Kubernetes due to an upstream change that enforces a new data directory (/var/lib/postgresql/MAJOR/docker) and adds a symlink from /var/lib/postgresql/data to /var/lib/postgresql.
Action required: Mount your volume to /var/lib/postgresql instead of /var/lib/postgresql/data. pgautoupgrade will detect any existing data there and migrate it to the new structure.
Utilizing GPU Acceleration
To leverage GPU acceleration for neural networks and face detection, follow these steps:
Update NVIDIA GPU Driver: Ensure you have the latest NVIDIA GPU driver installed on your system. You can download and install it from the official NVIDIA website.
Install NVIDIA Container Toolkit: Install the NVIDIA Container Toolkit, which enables GPU support within Docker containers. You can do this by running the following command:
sudo apt install nvidia-container-toolkitUpdate Docker Compose Configuration: Modify your
docker-compose.ymlfile to specify thereallibrephotos/librephotos-gpuimage as the backend for your application. Locate the relevant service definition for your backend, and update it to use the GPU-enabled image. For example:services:
backend:
image: reallibrephotos/librephotos-gpu:${tag}
# ... other configuration settings ...Configure GPU Resources in Docker Compose: Add a
deploysection to your Docker Compose file to allocate GPU resources to the backend service. Ensure you specify the correct GPU driver, count, and capabilities. Here's an example of how to do this:services:
backend:
image: reallibrephotos/librephotos-gpu:${tag}
# ... other configuration settings ...
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
The GPU image is only available for x86 architecture. ARM is not supported for the GPU image.
Changing the container names
Follow the normal instructions as per your chosen build, but after updating the .env file to choose your container names, run
make rename
Then you can resume following the normal instructions.
Old environment variables
These are now site settings. If you set these values, they will act as the default on the first set-up.
# Comma delimited list of patterns to ignore (e.g. "@eaDir,#recycle" for synology devices)
skipPatterns=
# Allow uploading files
allowUpload=true
# Do you want to see on a map where all your photos where taken (if a location is stored in your photos)
# Get a Map box API Key https://account.mapbox.com/auth/signup/
mapApiKey=
# Username for the Administrator login.
userName=admin
# Password for the administrative user you set above.
userPass=admin
# Email for the administrative user.
adminEmail=admin@example.com