Install rgallery with Docker or Docker Compose
Prerequisites
The following prerequisites are required to install rgallery with Docker or Docker Compose:
Docker
In a terminal, configure the path to your media files and run the following command:
docker run \
-v /path-to-your-media-files:/media:ro \
-v ./data:/data \
-v ./cache:/cache \
-p 3000:3000 \
robbymilo/rgallery:latest
The following volume is required for rgallery to access your media files:
- path to your media files:
/path-to-your-media-files:/media:ro
The following volumes are required to persist the database and image thumbnail cache:
- path to the database directory:
./data:/data
- path to the cache directory:
./cache:/cache
If they are unchanged the data and cache directories will be created in the current directory where the command is run.
The application will be available at http://localhost:3000.
Docker Compose
services:
rgallery:
image: robbymilo/rgallery:latest
# entrypoint:
# - rgallery
# - --data=./data # override database directory
# - --cache=./cache # override cache directory
# - --quality=60 # override thumbnail quality
# - --location_dataset=Countries10 # use lower resolution reverse geocode dataset
# - --tile_server=https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=<replace-with-your-API-key>
# - --include-originals=true # include originals in web view.
# platform: linux/arm64
platform: linux/amd64
volumes:
- ./media:/media:ro # path to your media files
- ./data:/data # path to the rgallery database directory
- ./cache:/cache # path to the rgallery cache directory
ports:
- 3000:3000
and then run
docker compose up -d
The application will be available at http://localhost:3000.
With docker compose in scalable mode:
services:
rgallery:
image: robbymilo/rgallery:latest
build:
context: .
dockerfile: cmd/rgallery/Dockerfile
# entrypoint:
# - rgallery
# - --data=./data # override database directory
# - --cache=./cache # override cache directory
# - --quality=60 # override thumbnail quality
# - --location_dataset=Countries10 # use lower resolution reverse geocode dataset
# - --tile_server=https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=<replace-with-your-API-key>
# - --include-originals=true # include originals in web view.
# platform: linux/arm64
platform: linux/amd64
environment:
- RGALLERY_RESIZE_SERVICE=http://rgallery-resize:3001
- RGALLERY_LOCATION_SERVICE=http://rgallery-geo:3002
volumes:
- ./media:/media:ro # path to your media files
- ./data:/data # path to the rgallery database directory
- ./cache:/cache # path to the rgallery cache directory
ports:
- 3000:3000
rgallery-resize:
image: robbymilo/rgallery:resize-latest
build:
context: .
dockerfile: cmd/rgallery-resize/Dockerfile
deploy:
mode: replicated
replicas: 3
# platform: linux/arm64
platform: linux/amd64
ports:
- 3001
rgallery-geo:
image: robbymilo/rgallery:geo-latest
build:
context: .
dockerfile: cmd/rgallery-geo/Dockerfile
# platform: linux/arm64
platform: linux/amd64
ports:
- 3002
and then run:
docker compose -d -f docker-compose-scalable.yml up --scale rgallery-resize=3
The application will be available at http://localhost:3000.