Coder Social home page Coder Social logo

s3photoalbum's Introduction

s3photoalbum

Show photoalbums from S3-compatible buckets, e.g. Minio.

The application consists of a server that serves the images as gallery and a thumbnailer that can be run seprately. Both the photos and the thumbnails will are saved in S3 buckets.

Requirements

Two S3 buckets.

TODO: bucket permissions exmaple

Configuration

The server and tumbnailer are both configured via environment varibles. All varibles without a default must be set.

Common settings

Variable Default Description
S3G_S3_ENDPOINT S3 Endpoint without scheme
S3G_S3_ACCESS_KEY S3 Access key
S3G_S3_SECRET_KEY S3 Secret key
S3G_S3_MEDIA_BUCKET Bucket where the media files are stored
S3G_S3_THUMBNAIL_BUCKET Bucket to place the Thumbnails in
S3G_S3_USE_SSL true Whether to use SSL (https://) to connect to the endpoint
S3G_MODE_DEVELOP false Run in development mode (verbose logging)

Different access and secret keys can be specified for the server and the tumbnailer. While the server will need only read access to both buckets, the thumbnailer needs to be able to write to the thumbnails bucket. The bucket containing the media files may be read-only in both cases.

Server-specific settings

Variable Default Description
S3G_JWT_KEY Key to use for JWT authentication (openssl rand -base64 172)
S3G_INITIAL_USER admin Initial user to create
S3G_INITIAL_PASS admin Plain-text password for intial user
S3G_HOST localhost Hostname of the application
S3G_LISTEN_ADDRESS 127.0.0.1 Address to listen on
S3G_LISTEN_PORT 7788 Port to listen on
S3G_RESOURCES_DIR . Directory containing /templates and /static directories

Don't forget to change the intial password after intial setup!

Thumbnailer-specific settings

Both ffmpegthumbnailer and exiftool are used to generate the thumbnails. The can be installed on most linux distributions via the package manager.

Variable Default Description
S3G_THUMBNAIL_SIZE 300" Size of generated thumbnails (in pixels)
S3G_FFMPEG_THUMBNAILER_PATH Path containing ffmpegthumbnailer
S3G_EXIF_TOOL_PATH Path containing exiftool

Run

Start the thumbnailer and the server separately with the above variables set

s3fs mount bucket

export AWS_ACCESS_KEY_ID="XXXXXXXXXXXXXXXXXXXX"
export AWS_SECRET_ACCESS_KEY="YYYYYYYYYYYYYYYYYYY"
s3fs bucket-name ~/s3mount -o 'use_path_request_style,url=https://s3.my.host'

s3photoalbum's People

Contributors

pinpox avatar mayniklas avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

mayniklas

s3photoalbum's Issues

Format whitelist for thumbnailer

Thumbnailer will try to create thumbnails for any file. We should check for supported content types and ignore any file not supported by the library.

Dont trust all proxies in gin

[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.