B3bas Uploader is simple S3 uploader file, build on the top of B3bas Golang Framework.
- Changing documentation in this file.
- Development Environment
export B3BAS_ENV=development - Staging Environment
export B3BAS_ENV=staging - Production Environment
export B3BAS_ENV=production
- Setup
AWS_ACCESS_KEYexport AWS_ACCESS_KEY=[YOUR_AWS_ACCESS_KEY] - Setup
AWS_SECRET_KEYexport AWS_SECRET_KEY=[YOUR_AWS_SECRET_KEY] - Setup
AWS_TOKENexport AWS_TOKEN=[YOUR_AWS_TOKEN]
- Define
[environment].main.iniinfiles/etc/b3bas-up/[environment][AwsConfig] AwsAccessKey = "YOUR_AWS_ACCESS_KEY" AwsSecretKey = "YOUR_AWS_SECRET_KEY" AwsToken = "YOUR_AWS_TOKEN" S3Region = "ap-southeast-1" S3Bucket = "b3bas-up" - Copy your
[environment].main.inifile to your/etc/b3bas-up/[environment]local machine / servermkdir -p /etc/b3bas-up/development mkdir -p /etc/b3bas-up/staging mkdir -p /etc/b3bas-up/production cp ./files/etc/b3bas-up/development/b3bas-up.main.ini /etc/b3bas-up/development/b3bas-up.main.ini cp ./files/etc/b3bas-up/staging/b3bas-up.main.ini /etc/b3bas-up/staging/b3bas-up.main.ini cp ./files/etc/b3bas-up/production/b3bas-up.main.ini /etc/b3bas-up/production/b3bas-up.main.ini - Default Region & Bucket in
app.goS3_REGION = "ap-southeast-1" S3_BUCKET = "b3bas-up"
- Build (using
make)make build - Build (using
gobinary)go build app.go - Run (using
make)make run - Run (using
gobinary)go run app.go
make build
./bin/b3bas-up [bucket_name] [file_name]
Apache version 2