cbenning / fussel

A static photo gallery generator
https://github.com/cbenning/fussel
MIT License
263 stars 17 forks source link
docker gallery photos static-site-generator

Fussel

License Badge Version Badge

Fussel is a static photo gallery generator. It can build a simple static photo gallery site with nothing but a directory full of photos.

Demo Site

Features and Properties:

Common Use-cases:

Screenshots

Albums Screenshot Album Screenshot
People Screenshot Person Screenshot

Demo

Demo Gif

Setup

Requirements

Install dependencies

Setup Site

Configure

Curate photos

The folder you point gallery.input_path at must have subfolders inside it with the folder names as the name of the albums you want in the gallery.

Example

If you have your .env setup with:

gallery:
  input_path: "/home/user/Photos/gallery"

Then that path should look like this:

/home/user/Photos/gallery:
  - Album 1
  - Album 2
    - Sub Album 1
  - Album 3
    - Sub Album 2
  - ...

Generate your site

Run the following script to generate your site into the path you set in gallery.output_path folder.

Host your site

Point your web server at gallery.output_path folder or copy/upload the gallery.output_path folder to your web host HTTP root.

Quick setup

After running generate_site.sh

Development setup

Docker

If you don't want to fuss with anything and would like to use docker instead to generate your site...

Usage

Required:

Note:

Optional: You can provide any value found in the config.yml file in a docker label variable using --label item=value

docker run \
  -e PGID=$(id -g) \
  -e PUID=$(id -u) \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v <input_path>:/input:ro \
  -v <output_path>:/output \
  --label gallery.input_path="/input" \
  --label gallery.output_path="/output" \
  --label gallery.overwrite=False \
  --label gallery.parallel_tasks=4 \
  --label gallery.albums.recursive=True \
  --label gallery.albums.recursive_name_pattern="{parent_album} > {album}" \
  --label gallery.people.enable=True \
  --label gallery.watermark.enable=True \
  --label gallery.watermark.path="web/src/images/fussel-watermark.png" \
  --label gallery.watermark.size_ratio=0.3 \
  --label site.http_root="/" \
  --label site.title="Fussel Gallery" \
  ghcr.io/cbenning/fussel:latest 

Once complete you can upload the output folder to your webserver, or see what it looks like with python -m http.server --directory <output_path>

FAQ

I get an error 'JavaScript heap out of memory'

Try increasing your Node memory allocation: NODE_OPTIONS="--max-old-space-size=2048" yarn build

Reference: https://github.com/cbenning/fussel/issues/25