Add usage documentation
This commit is contained in:
parent
5e8194e760
commit
b76a60f6a6
3 changed files with 19 additions and 9 deletions
17
README.md
17
README.md
|
@ -6,9 +6,22 @@
|
|||
|
||||
A Web GUI written in Go to manage S3 buckets from any provider.
|
||||
|
||||
![Screenshot](https://raw.githubusercontent.com/mastertinner/s3manager/master/screenshot.png)
|
||||
|
||||
## Usage
|
||||
|
||||
The application can be configured with the following environment variables:
|
||||
|
||||
- `ENDPOINT`: The endpoint of your S3 server (defaults to `s3.amazonaws.com`)
|
||||
- `ACCESS_KEY_ID`: Your S3 access key ID (required)
|
||||
- `SECRET_ACCESS_KEY`: Your S3 secret access key (required)
|
||||
- `PORT`: The port the app should listen on (defaults to `8080`)
|
||||
|
||||
Then simply run the binary.
|
||||
|
||||
## Build and Run Locally
|
||||
|
||||
1. Run `make`
|
||||
1. Run `make build`
|
||||
1. Execute the created binary and visit <http://localhost:8080>
|
||||
|
||||
## Run Tests
|
||||
|
@ -21,7 +34,7 @@ The image is available on [Docker Hub](https://hub.docker.com/r/mastertinner/s3m
|
|||
|
||||
1. Run `make build-docker`
|
||||
|
||||
## Run on Cloud Foundry
|
||||
## Deploy to Cloud Foundry
|
||||
|
||||
1. Modify `deployments/cf/*` to your liking
|
||||
1. Run `make deploy-cf`
|
||||
|
|
|
@ -14,26 +14,23 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
endpoint, ok := os.LookupEnv("ENDPOINT")
|
||||
if !ok {
|
||||
endpoint = "s3.amazonaws.com"
|
||||
}
|
||||
accessKeyID, ok := os.LookupEnv("ACCESS_KEY_ID")
|
||||
if !ok {
|
||||
log.Fatal("please provide ACCESS_KEY_ID")
|
||||
}
|
||||
|
||||
secretAccessKey, ok := os.LookupEnv("SECRET_ACCESS_KEY")
|
||||
if !ok {
|
||||
log.Fatal("please provide SECRET_ACCESS_KEY")
|
||||
}
|
||||
|
||||
port, ok := os.LookupEnv("PORT")
|
||||
if !ok {
|
||||
port = "8080"
|
||||
}
|
||||
|
||||
endpoint, ok := os.LookupEnv("ENDPOINT")
|
||||
if !ok {
|
||||
endpoint = "s3.amazonaws.com"
|
||||
}
|
||||
|
||||
tmplDir := filepath.Join("web", "template")
|
||||
|
||||
// Set up S3 client
|
||||
|
|
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 512 KiB |
Loading…
Reference in a new issue