Add docker-compose info
This commit is contained in:
parent
c611a6ff70
commit
a91d01ca96
4 changed files with 25 additions and 7 deletions
3
Dockerfile
Normal file
3
Dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM golang:onbuild
|
||||
|
||||
EXPOSE 8080
|
17
README.md
17
README.md
|
@ -13,11 +13,17 @@ A Web GUI written in Go to manage S3 buckets from any provider.
|
|||
|
||||
## Run locally
|
||||
|
||||
1. Set all necessary environment variables
|
||||
1. Run `go build`
|
||||
1. Run the binary and visit <http://localhost:8080>
|
||||
1. Set environment variables in your env
|
||||
1. Execute the binary and visit <http://localhost:8080>
|
||||
|
||||
## Build with Docker
|
||||
## Run with Docker
|
||||
|
||||
1. Set environment variables in `docker-compose.yml`
|
||||
1. Run `docker-compose up`
|
||||
1. Visit <http://localhost:8080>
|
||||
|
||||
## Build with Docker and run anywhere
|
||||
|
||||
1. Run `docker run --rm -v "${PWD}:/go/src/github.com/mastertinner/s3-manager" -w /go/src/github.com/mastertinner/s3-manager golang curl https://glide.sh/get | sh && glide install && go build`
|
||||
|
||||
|
@ -25,9 +31,8 @@ A Web GUI written in Go to manage S3 buckets from any provider.
|
|||
|
||||
To cross-compile for macOS, use the `-e "GOOS=darwin" -e "GOARCH=amd64"` flags (depending on your system, you might have to adjust `GOARCH`)
|
||||
|
||||
|
||||
## Push to Cloud Foundry
|
||||
## Run on Cloud Foundry
|
||||
|
||||
1. Set environment variables in `manifest.yml`
|
||||
1. Set hostname that isn't taken yet in `manifest.yml`
|
||||
1. Set host that isn't taken yet in `manifest.yml`
|
||||
1. Run `cf push`
|
||||
|
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
version: '2'
|
||||
services:
|
||||
|
||||
s3-manager:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- S3_ACCESS_KEY_ID=xxx
|
||||
- S3_SECRET_ACCESS_KEY=xxx
|
|
@ -6,5 +6,5 @@ applications:
|
|||
buildpack: https://github.com/cloudfoundry/go-buildpack.git
|
||||
|
||||
env:
|
||||
S3_ACCESS_KEY_ID: "XXX"
|
||||
S3_ACCESS_KEY_ID: "xxx"
|
||||
S3_SECRET_ACCESS_KEY: "xxx"
|
||||
|
|
Loading…
Reference in a new issue