Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/gosePublic

A tera-scale file uploader

License

NotificationsYou must be signed in to change notification settings

stv0g/gose

Repository files navigation

GoSƐ logo

GoSƐ: A terascale file-uploader

goreportcardCodacy gradeLicenseGitHub go.mod Go versionGo Reference

GoSƐ is a modern and scalable file-uploader focusing on scalability and simplicity. It is a little hobby project I’ve been working on over the last weekends.

The only requirement for GoSƐ is a S3 storage backend which allows to it to scale horizontally without the need for additional databases or caches. Uploaded files a divided into equally sized chunks which are hashed with a MD5 digest in the browser for upload. This allows GoSƐ to skip chunks which already exist. Seamless resumption of interrupted uploads and storage savings are the consequence.

And either way both upload and downloads are always directed directly at the S3 server so GoSƐ only sees a few small HTTP requests instead of the bulk of the data. Behind the scenes, GoSƐ uses many of the more advanced S3 features likeMulti-part Uploads andPre-signed Requests to make this happen.

Users have a few options to select between multiple pre-configured S3 buckets/servers or enable browser & mail notifications about completed uploads. A customisable retention / expiration time for each upload is also selectable by the user and implemented byS3 life-cycle policies. Optionally, users can also opt-in to use an external service to shorten the URL of the uploaded file.

Currently a single concurrent upload of a single file is supported. Users can observe the progress via a table of details statistics, a progress-bar and a chart showing the current transfer speed.

GoSƐ aims at keeping its deployment simple and by bundling both front- & backend components in a single binary or Docker image. GoSƐ has been tested with AWS S3, Ceph’s RadosGW and Minio. Pre-built binaries and Docker images of GoSƐ are available for all major operating systems and architectures at therelease page.

GoSƐ is open-source software licensed under the Apache 2.0 license.

Check our myblog article for more background info.

Features

  • De-duplication of uploaded files based on their content-hash
    • Uploads of existing files will complete in no-time without re-upload
  • S3 Multi-part uploads
    • Resumption of interrupted uploads
  • Drag & Drop of files
  • Browser notifications about failed & completed uploads
  • User-provided object expiration/retention time
  • Copy URL of uploaded file to clip-board
  • Detailed transfer statistics and progress-bar / chart
  • Installation via single binary or container
    • JS/HTML/CSS Frontend is bundled into binary
  • Scalable to multiple replicas
    • All state is kept in the S3 storage backend
    • No other database or cache is required
  • Direct up & download to Amazon S3 via presigned URLs
    • GoSƐ deployment does not see an significant traffic
  • UTF-8 filenames
  • Multiple user-selectable buckets / servers
  • Optional link shortening via an external service
  • Optional notification about new uploads viashoutrrr
    • Mail notifications to user-provided recipient
  • Cross-platform support:
    • Operating systems: Windows, macOS, Linux, BSD
    • Architectures: arm64, amd64, armv7, i386

Roadmap

Checkout theGithub issue tracker.

Demo (click for Live-Demo)

GoSƐ demo screencast

Installation

Pre-compiled binaries from GitHub releases

Take the download link for your OS/Arch from theReleases Page and run:

sudo wget https://github.com/stv0g/gose/releases/download/v0.0.2/gose_0.0.2_linux_amd64 -O /usr/local/bin/gosechmod +x /usr/local/bin/gose

Kubernetes / Kustomize

  1. Copy default configuration file:cp config.yaml kustomize/config.yaml
  2. Adjust config:nano kustomize/config.yaml
  3. Apply configuration:kubectl apply -k kustomize

Docker

Via environment variables in.env file:

docker run --env-file=.env --publish=8080:8080 ghcr.io/stv0g/gose

or via a configuration file:

docker run -v$(pwd)/config.yaml:/config.yaml --publish=8080:8080 ghcr.io/stv0g/gose -config /config.yaml

Docker Compose

We ship acompose.yaml file to get you started.Please adjust the environment variables in it and then run:

docker compose up -d

Nix

GoSƐ is available inNixpkgs as well as a flake:

nix profile install nixpkgs#gose# Or via our flakenix profile install github:stv0g/gose#gose

Configuration

GoSƐ can be configured via a configuration file and/or environment variables

File

For reference have a look at theexample configuration file.

Environment variables

All settings from the configuration file can also be set via environment variables:

VariableDefault ValueDescription
GOSE_LISTEN":8080"Listen address and port of Gose
GOSE_BASE_URL"http://localhost:8080"Base URL at which GoSƐ is accessible
GOSE_STATIC"./dist"Directory of frontend assets (pre-compiled binaries of GoSƐ come with assets embedded into binary.)
GOSE_BUCKETgose-uploadsName of S3 bucket
GOSE_ENDPOINT(withouthttp(s):// prefix, but with port number)Hostname:Port of S3 server
GOSE_REGIONus-east-1Region of S3 server
GOSE_PATH_STYLEfalsePrepend bucket name to path
GOSE_NO_SSLfalseDisable SSL encryption for S3
GOSE_ACCESS_KEYS3 Access Key
GOSE_SECRET_KEYS3 Secret Key
GOSE_SETUP_BUCKETtrueCreate S3 bucket if do not exists
GOSE_SETUP_CORStrue (if supported by S3 implementation)Setup S3 bucket CORS rules
GOSE_SETUP_LIFECYCLEtrue (if supported by S3 implementation)Setup S3 bucket lifecycle rules
GOSE_SETUP_ABORT_INCOMPLETE_UPLOADS31Number of days after which incomplete uploads are cleaned-up (set to 0 to disable)
GOSE_MAX_UPLOAD_SIZE1TBMaximum upload size
GOSE_PART_SIZE16MBPart-size for multi-part uploads
AWS_ACCESS_KEY_IDalias forGOSE_ACCESS_KEY
AWS_SECRET_ACCESS_KEYalias forGOSE_SECRET_KEY

Configuration of link shortener and notifiers must be done via aconfiguration file.

Author

GoSƐ has been written bySteffen Vogel.

License

GoSƐ is licensed under theApache 2.0 license.

About

A tera-scale file uploader

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp