What is PiGallery2?
PiGallery2
is a fast directory-first photo gallery website with a rich user interface optimized for running on low-resource servers (especially Raspberry Pi)
The so-called directory priority means that the design of this kind of website is to display different directories (or folders) as the main function, rather than to display individual photos or other content.
If you don’t want to build it yourself, you can go to the official experience site: https://pigallery2.onrender.com/
PiGallery2 function demonstration video
Install
Install using Docker on Synology.
Search in the registry pigallery2
, select the first one bpatrik/pigallery2
, version selection latest
.
At the time of writing,
latest
the version corresponds to1.9.5
;
roll
Within docker
the folder, create a new folder pigallery2
and within it four subfolders config
, data
, images
andtmp
folder | mount path | illustrate |
---|---|---|
docker/pigallery2/config |
/app/data/config |
Save settings |
docker/pigallery2/data |
/app/data/db |
Store database |
docker/pigallery2/images |
/app/data/images |
Save pictures |
docker/pigallery2/tmp |
/app/data/tmp |
Temporary Files |
images
Check the gallery folder to read-only;
port
As long as the local port does not conflict, if you are not sure, you can check it with the command
# 查看端口占用
netstat -tunlp | grep 端口号
local port | container port |
---|---|
8213 |
80 |
Command line installation
If you are familiar with the command line, it may be docker cli
faster to use
# 新建文件夹 pigallery2 和子目录
mkdir -p /volume1/docker/pigallery2/{
config,data,images,tmp}
# 进入 pigallery2 目录
cd /volume1/docker/pigallery2
# 运行容器
docker run -d \
--restart always \
--name pigallery2\
-p 8213:80 \
-v $(pwd)/config:/app/data/config \
-v $(pwd)/data:/app/data/db \
-v $(pwd)/images:/app/data/images:ro \
-v $(pwd)/tmp:/app/data/tmp \
-e NODE_ENV=production \
bpatrik/pigallery2:latest
You can also use to docker-compose
install and save the following content as docker-compose.yml
a file
version: '3'
services:
pigallery2:
image: bpatrik/pigallery2:latest
container_name: pigallery2
restart: always
ports:
- 8213:80
volumes:
- ./config:/app/data/config
- ./data:/app/data/db
- ./images:/app/data/images:ro
- ./tmp:/app/data/tmp
environment:
- NODE_ENV=production
Then execute the following command
# 新建文件夹 pigallery2 和 子目录
mkdir -p /volume1/docker/pigallery2/{
config,data,images,tmp}
# 进入 pigallery2 目录
cd /volume1/docker/pigallery2
# 将 docker-compose.yml 放入当前目录
# 一键启动
docker-compose up -d
run
Enter in the browser http://群晖IP:8213
and you will see the login interface
- Default user:
admin
, password:admin
- Remember to change your password after successful login, otherwise there will always be a red prompt.
images
Copied 2
images from directories into
refresh page
Choose one to enter the directory
Support keyword filtering
Open a picture
The function is very simple and practical. There are no functions such as library changes (photo deletion, rotation, enhancement, marking, organization). According to the official instructions, it is optimized for the library containing < 100K
photos and < 5k
photos/folders. The more pictures you add, the faster it will start to slow down.
Reference documentation
bpatrik/pigallery2: A fast directory-first photo gallery website, with rich UI, optimized for running on low resource servers (especially on raspberry pi)
地址:https://github.com/bpatrik/pigallery2
PiGallery 2
address: http://bpatrik.github.io/pigallery2/