Web interface for sharing online files (Go)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alfred a4b6fb6f7d Add home text 1 month ago
api Add home text 1 month ago
docker Add dockerfile 1 month ago
managers Improve folders look&feel 1 month ago
settings Add home text 1 month ago
static Add statics and improve route 1 month ago
templates Add home text 1 month ago
README.md Improve README.md 1 month ago
go.mod Access to S3 1 month ago
go.sum Access to S3 1 month ago
main.go Add statics and improve route 1 month ago

README.md

Gloudviewer

Gloudviewer is the second version of the cloudviewer project. This time is more beautiful, smaller, simpler, easier-to-deploy, and coded in Go.

It basically is a web interface for sharing uploaded content to the cloud. As I developed it for my requirements, the only cloud provider in which I have tested it is Wasabi. However, being Wasabi a clone of Amazon S3, you probably could easily configure it to accept that.

Configuration

You can configure Gloudviewer using the template file settings/config.yml. If you wanted to provide your own, you only have to set the environment variable GLOUDVIEWER_CONFIG with the path where the concrete config.yml is.

Basically it requires two files. Into the config.yml there are the required parameters to launch Gloudviewer; into a JSON definition file we will configure the access to those buckets in the S3 that we want to share their content.

Example of running it locally

$ export GLOUDVIEWER_CONFIG=/home/alfred/gloudviewer && go run main.go

Docker

There is a Dockerfile inside the docker path into the root. As you probably know you, with this it will be really easy to deploy Gloudviewer. Lets imagine the next example configuration files:

Example settings file (/home/alfred/gloudviewer/config.yml):

api:
  port: :9090
s3:
  endpoint: http://s3.wasabisys.com
  region: us-east-1
  access_key_id: XXXXXXXXXXXB
  secret_access_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXB
  link_template: "//{{ .Bucket }}.S3.wasabisys.com/{{ .Path }}"
gloudviewer:
  title: dev
  json_definition: /home/alfred/gloudviewer/definition.json

Example definition file (/home/alfred/gloudviewer/definition.json):

{
	"sections": [
		{
			"name": "films",
			"bucket": "my-files",
			"path": "movies",
			"hidden": false
		},
		{
			"name": "bdsm",
			"bucket": "porn",
			"path": "bdsm",
			"hidden": true
		}
	]
}

Build

To build the docker image we will use a similar to this:

docker build -f docker/Dockerfile -t gloudviewer .

Run

To run the docker container once the image has been built we will use a similar command to this:

docker run -ti -p 9090:9090 -v /home/alfred/gloudviewer/:/srv/settings gloudviewer