Allow s3 bucket to come from config vars

This commit is contained in:
Yannick 2015-11-06 14:05:29 +01:00
parent fde0bbf4b3
commit 8a594a7f61
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,10 @@ func newS3Backend(conf map[string]string) (Backend, error) {
bucket, ok := conf["bucket"]
if !ok {
return nil, fmt.Errorf("'bucket' must be set")
bucket = os.Getenv("AWS_S3_BUCKET")
if bucket == "" {
return nil, fmt.Errorf("'bucket' must be set")
}
}
access_key, ok := conf["access_key"]