项目作者: e2fyi

项目描述 :
Web server for S3 compatible storage
高级语言: Go
项目地址: git://github.com/e2fyi/minio-web.git
创建时间: 2019-04-10T04:52:52Z
项目社区:https://github.com/e2fyi/minio-web

开源协议:Apache License 2.0

下载


github.com/e2fyi/minio-web

godoc
dockerhub
Docker Repository on Quay
GitHub tag (latest SemVer)

A web server proxy for any S3-compatible storage.

Quickstart

Environment variables

  1. # where config file is located
  2. CONFIG_FILE_PATH=configs/config.json
  3. # port for minio-web to listen to
  4. SERVER_PORT=8080
  5. # path to ssl cert and key files
  6. SERVER_SSL_CERT=
  7. SERVER_SLL_KEY=
  8. # endpoint to call for the s3 compatible storage
  9. MINIO_ENDPOINT=s3.amazonaws.com
  10. # access key and secret key
  11. MINIO_ACCESSKEY=
  12. MINIO_SECRETKEY=
  13. # ssl when calling endpoint
  14. MINIO_SECURE=true
  15. # aws s3 bucket region (optional)
  16. MINIO_REGION=
  17. # Extensions #
  18. # bucket to serve if provided (http://minio-web/abc => endpoint/bucketname/abc)
  19. # if not provided (http://minio-web/abc/efg => endpoint/abc/efg) where abc is the bucket
  20. EXT_BUCKETNAME=
  21. # prefix to add to query.
  22. # e.g. EXT_PREFIX=foo/
  23. # query to endpoint/abc -> query EXT_BUCKETNAME/foo/ab
  24. EXT_PREFIX=
  25. # if provided a list of default index files to return
  26. # i.e http://minio-web/abc/ => http://minio-web/abc/index.html
  27. EXT_DEFAULTHTML=index.html,README.md
  28. # if provided, returns a default favicon if backend does not have one.
  29. EXT_FAVICON=assets/favicon.ico
  30. # if set, list the folders inside a folder
  31. EXT_LISTFOLDER=true
  32. # objects that match the glob expression will be listed. e.g. markdown files
  33. EXT_LISTFOLDEROBJECTS=*.{md,html,jpg,jpeg,png,txt}
  34. # if provided, renders any markdown resources as HTML with the template.
  35. # template MUST have a placeholder {{ .Content }}
  36. EXT_MARKDOWNTEMPLATE=assets/md-template.html

Config file

  1. {
  2. "server": {
  3. "port": 8080,
  4. "ssl": {
  5. "cert": "",
  6. "key": ""
  7. }
  8. },
  9. "minio": {
  10. "endpoint": "s3.amazonaws.com",
  11. "accesskey": "",
  12. "secretkey": "",
  13. "secure": false,
  14. "region": ""
  15. },
  16. "ext": {
  17. "bucketname": "",
  18. "defaulthtml": "index.html,README.md",
  19. "favicon": "assets/favicon.ico",
  20. "markdowntemplate": "assets/md-template.html",
  21. "listfolder": true,
  22. "listfolderobjects": "*.{md,html,jpg,jpeg,png,txt}"
  23. }
  24. }

Run demo locally

  1. # starts a minio server
  2. ./scripts/start-minio-server.sh
  3. # starts minio-web service
  4. go run .

Alternatively, with docker compose:

  1. # you can access the minio-store at localhost:9000
  2. # and the minio-web at localhost:8080
  3. docker-compose up -d

Docker image

Image will now available in ~Dockerhub~, Quay.io and Github registry.

  • ~e2fyi/minio-web:<tag>~
  • quay.io/e2fyi/minio-web:<tag>
  • ghcr.io/e2fyi/minio-web:<tag>

Free tier for docker hub automated build has been discontinued.
Until I find time to setup GitHub actions, no new tags will be pushed to docker hub.
i.e. All the latest releases can only be found in Quay.io and ghcr.io (thanks @PseudoResonance)

  1. # build locally
  2. docker build -t e2fyi/minio-web:latest .
  3. # pull from dockerhub
  4. docker pull e2fyi/minio-web:latest
  5. # run docker container
  6. docker run --rm -ti \
  7. -p 8080:8080 \
  8. --env-file .envfile \
  9. e2fyi/minio-web:latest

Kubernetes deployment (Kustomize)

kustomize k8s manifest for
minio-web can be found in manifest/.

GoDoc