Skip to content

A simple web gallery written in golang for serving images

License

Notifications You must be signed in to change notification settings

kuhball/gollery

Repository files navigation

gollery

A simple web gallery written in golang for serving images

Features

  • create different image sizes (thumbnail / preview / future: mobile) using imagemagick
  • watch image folders and create images automatically
  • serve a site for every gallery
  • responsive masonry layout
  • create zip with all images
  • custom css for every gallery

alt text

Installation

Prerequisites

For creating thumbnails & previews gollery uses imagemagick. Please install a suitable imagemagick version for your os and make sure it's reachable via convert or magick.

Download imagemagick

Build from source

  1. clone the github repo
  2. make install
  3. make build
  4. there should be a application in your $GOPATH/bin called gollery

Download binaries

Download the latest release.

Usage

CLI

Gollery comes with a simple cli and 3 basic commands:

  1. gollery start

    This command starts the webserver and the filewatcher.

  2. gollery init

    This command creates a new root folder with a config.yaml and a example gallery

  3. gollery new

    This command creates a new gallery within an existing config.yaml and adds it to the config.

  4. gollery remove

    This command removes a gallery from an existing config.yaml and deletes the folder structure.

The folder of the config.yaml and the galleries can be provided manual with gollery -c /PATH/TO/GOLLERY/ COMMAND. This is possible with all commands. Check the help for further options.

Docker

There's the possibility to build gollery within a docker container. At the moment you still need to create a config with the binary or by hand outside the container.

make build-docker docker run -p 8080:8080 -v /PATH/TO/GALLERY/FOLDER:/gollery --name gollery gollery