s3manager-web/README.md

78 lines
3 KiB
Markdown
Raw Normal View History

2016-12-18 22:54:21 +01:00
# S3 Manager
2022-03-16 14:38:08 +01:00
[![Go Report Card](https://goreportcard.com/badge/github.com/cloudlena/s3manager)](https://goreportcard.com/report/github.com/cloudlena/s3manager)
[![Build Status](https://github.com/cloudlena/s3manager/actions/workflows/main.yml/badge.svg)](https://github.com/cloudlena/s3manager/actions)
2017-04-07 09:16:59 +02:00
2017-04-06 17:58:26 +02:00
A Web GUI written in Go to manage S3 buckets from any provider.
2016-12-18 22:54:21 +01:00
2023-10-12 18:18:50 +02:00
![Screenshot](https://raw.githubusercontent.com/cloudlena/s3manager/main/screenshot.png)
2020-05-04 10:33:23 +02:00
2022-02-23 15:53:02 +01:00
## Features
- List all buckets in your account
- Create a new bucket
- List all objects in a bucket
- Upload new objects to a bucket
- Download object from a bucket
- Delete an object in a bucket
2020-05-04 10:33:23 +02:00
## Usage
2020-05-04 15:35:59 +02:00
### Configuration
2020-05-04 10:33:23 +02:00
The application can be configured with the following environment variables:
- `ENDPOINT`: The endpoint of your S3 server (defaults to `s3.amazonaws.com`)
2021-08-05 11:44:40 +02:00
- `REGION`: The region of your S3 server (defaults to `""`)
2022-03-24 08:46:21 +01:00
- `ACCESS_KEY_ID`: Your S3 access key ID (required) (works only if `USE_IAM` is `false`)
- `SECRET_ACCESS_KEY`: Your S3 secret access key (required) (works only if `USE_IAM` is `false`)
2020-05-04 15:35:59 +02:00
- `USE_SSL`: Whether your S3 server uses SSL or not (defaults to `true`)
2021-04-16 14:55:19 +02:00
- `SKIP_SSL_VERIFICATION`: Whether the HTTP client should skip SSL verification (defaults to `false`)
2023-09-28 12:16:02 +02:00
- `SIGNATURE_TYPE`: The signature type to be used (defaults to `V4`; valid values are `V2, V4, V4Streaming, Anonymous`)
2020-05-04 15:35:59 +02:00
- `PORT`: The port the s3manager app should listen on (defaults to `8080`)
- `ALLOW_DELETE`: Enable buttons to delete objects (defaults to `true`)
- `FORCE_DOWNLOAD`: Add response headers for object downloading instead of opening in a new tab (defaults to `true`)
2022-03-24 08:46:21 +01:00
- `LIST_RECURSIVE`: List all objects in buckets recursively (defaults to `false`)
- `USE_IAM`: Use IAM role instead of key pair (defaults to `false`)
- `IAM_ENDPOINT`: Endpoint for IAM role retrieving (Can be blank for AWS)
2023-02-09 12:05:14 +01:00
- `SSE_TYPE`: Specified server side encrpytion (defaults blank) Valid values can be `SSE`, `KMS`, `SSE-C` all others values don't enable the SSE
- `SSE_KEY`: The key needed for SSE method (only for `KMS` and `SSE-C`)
2023-07-28 15:05:14 +02:00
- `TIMEOUT`: The read and write timout in seconds (default to `600` - 10 minutes)
2020-05-04 10:33:23 +02:00
2020-05-04 15:35:59 +02:00
### Build and Run Locally
2017-04-27 12:29:13 +02:00
2020-05-04 10:33:23 +02:00
1. Run `make build`
2018-03-14 21:53:35 +01:00
1. Execute the created binary and visit <http://localhost:8080>
2017-04-27 12:29:13 +02:00
2021-08-05 11:44:40 +02:00
### Run Container image
2020-11-03 11:36:43 +01:00
2022-02-23 15:53:02 +01:00
1. Run `docker run -p 8080:8080 -e 'ACCESS_KEY_ID=XXX' -e 'SECRET_ACCESS_KEY=xxx' cloudlena/s3manager`
2020-11-03 11:36:43 +01:00
2022-03-31 12:12:54 +02:00
### Deploy to Kubernetes
2022-04-01 06:26:41 +02:00
2022-03-31 12:12:54 +02:00
You can deploy s3manager to a Kubernetes cluster using the [Helm chart](https://github.com/sergeyshevch/s3manager-helm).
2022-04-01 06:26:41 +02:00
2020-05-04 15:35:59 +02:00
## Development
### Lint Code
1. Run `make lint`
### Run Tests
2018-03-14 21:53:35 +01:00
1. Run `make test`
2021-08-05 11:44:40 +02:00
### Build Container Image
2022-04-19 19:04:37 +02:00
The image is available on [Docker Hub](https://hub.docker.com/r/cloudlena/s3manager/).
2018-10-27 14:59:59 +02:00
2021-08-05 11:44:40 +02:00
1. Run `make build-image`
2020-05-04 15:35:59 +02:00
### Run Locally for Testing
2017-03-30 22:56:25 +02:00
2023-10-12 18:18:50 +02:00
There is an example [docker-compose.yml](https://github.com/cloudlena/s3manager/blob/main/docker-compose.yml) file that spins up an S3 service and the s3manager. You can try it by issuing the following command:
2020-05-04 15:35:59 +02:00
```shell
$ docker-compose up
```