Go to file
Stefan Forstenlechner 1be821b8cb
Build and publish docker image snapshot / build-and-publish (push) Successful in 1m21s Details
No need to set `loading={"lazy"}`
as react-photo-album has it in the props anyway
2024-08-22 12:00:53 +02:00
.gitea/workflows Remove image with sha hash tag 2024-08-21 23:09:42 +02:00
picture-gallery-client No need to set `loading={"lazy"}` 2024-08-22 12:00:53 +02:00
picture-gallery-server Fix caching on server 2024-08-20 23:35:06 +02:00
public Revert back to react-photo-album and improve FolderGallery 2024-08-20 22:39:42 +02:00
.dockerignore Add some sensible sorting 2022-05-26 23:05:48 +02:00
.gitignore integrate lighthouse 2022-08-08 17:34:32 +02:00
Dockerfile Update/fix docker build 2024-08-19 19:18:58 +02:00
README.md Add nginx cache recommendation 2024-08-21 22:00:31 +02:00
package.json update server versions 2024-08-12 12:18:53 +02:00

README.md

Simple Picture Gallery

A simple picture gallery. No database required. Photos can simply be stored in your file system. Add and remove photos. Simple picture gallery will automatically show them and create thumbnails.

Getting Started

Information

Folders should only contain images and folders. Folders should not contain any other files.

Docker

The easiest way to run simple picture gallery is with docker.

docker build . -t simple-picture-gallery
docker run -p 3005:3001 -v /mnt/path/to/pictures:/usr/src/app/public --name my-picture-gallery simple-picture-gallery

Customization

Create an environment file .env containing any of the following properties to customize your gallery. All properties are optional.

VITE_TITLE=My Gallery
VITE_APPBAR_COLOR=#F8AB2D
VITE_FAVICON_HREF=<URL to your favicon>

And run docker with --env-file .env

docker run -p 3005:3001 -v C:/DATA/temp/bla:/usr/src/app/public --env-file .env --name my-picture-gallery simple-picture-gallery

nginx

It is recommended to use a cache for the API calls so that not every request has to read the file system again.

http {

  proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=picture_gallery_cache:10m max_size=100m inactive=60m use_temp_path=off;
  
  
  server {
    ...

    location / {
       proxy_pass http://127.0.0.1:3005;
    }

    location ~ /(images|directories|folderspreview) {
       proxy_cache picture_gallery_cache;
       proxy_cache_valid 200 302 600m;
       proxy_cache_min_uses 1;
       proxy_pass http://127.0.0.1:3005;
    }

    ...
  }
}