Skip to content

gbbirkisson/spis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9dd762f · Jan 21, 2023

History

53 Commits
Dec 11, 2022
Nov 24, 2022
Dec 3, 2022
Dec 3, 2022
Jan 21, 2023
Jan 21, 2023
Jan 21, 2023
Nov 24, 2022
Nov 24, 2022
Nov 27, 2022
Jan 21, 2023
Nov 8, 2022
Nov 6, 2022
Dec 7, 2022
Nov 24, 2022
Nov 24, 2022
Nov 24, 2022
Jan 8, 2023
Dec 7, 2022
Nov 12, 2022
Nov 24, 2022
Nov 20, 2022

Repository files navigation

SPIS

GitHub release (latest SemVer) GitHub last commit (branch) CI codecov GitHub

This project is called "Simple Private Image Server" or SPIS for short. It's purpose is to be a lightweight and fast server to display media hosted on a private server. This project came about when I was searching for a solution like this and found nothing. Everything seemed way to feature heavy and slow, requiring you to setup heavy databases and other unnecessary components.

The goals for this project are:

  • Simple to setup 🏝️
  • Lightweight, multi-threaded and fast 🚀
  • Minimalistic GUI 🤩
  • Easy to use on mobile 📱

Table of contents

Screenshot

This is how the GUI looks!

Setup

Configuration

Everything is configured via environmental variables:

Variable Name Required Default Description
SPIS_MEDIA_DIR Yes Where should the server look for media
SPIS_DATA_DIR Yes Where should the server store its data
SPIS_PROCESSING_SCHEDULE No 0 0 2 * * * When should the server look for media (default is every night at 2)
SPIS_PROCESSING_RUN_ON_START No false Should the server look for media on start
SPIS_API_MEDIA_PATH No /assets/media Where will the media be served by webserver
SPIS_API_THUMBNAIL_PATH No /assets/thumbnails Where will the thumbnails be served by webserver
SPIS_SERVER_SOCKET No /var/run/spis.sock Path of the socket the server will listen to
SPIS_SERVER_ADDRESS No Address to listen to rather than socket, i.e. 0.0.0.0:8000
RUST_LOG No Loglevels of the application, i.e. error,spis_server=info

Docker

Easiest way to run SPIS is with the docker image:

$ docker run -it \
    -p 8080:8080 \
    -v /path/to/your/media:/var/lib/spis/media \
    -v /path/to/save/data:/var/lib/spis/data \
    ghcr.io/gbbirkisson/spis:<version>

Binary

Just download a binary for your architecture and run it. Note that the spis-server binary does not serve images. For that you can use something like nginx. See nginx config for an example.

Note: To get video support both ffmpeg and ffprobe must be present in path!

Progressive Web App

If you have an Android phone, you can add SPIS as a PWA. Open up the server home page in the chrome browser, open top-right menu, and select Add to Home screen.

Development

Setup dependencies

$ make setup dl-img

Running

Run stack with:

$ make dev

Or alternatively open 3 terminals and run:

$ make dev-nginx
$ make dev-server
$ make dev-gui

And then open http://localhost:7000