Skip to content

Commit

Permalink
tweak config var for bucket name
Browse files Browse the repository at this point in the history
  • Loading branch information
nicpottier committed May 12, 2018
1 parent 1125ff8 commit ae6960b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Usage of archiver:
print usage information
-log-level string
the log level, one of error, warn, info, debug (default "info")
-s3-archive-bucket string
-s3-bucket string
the S3 bucket we will write archives to (default "dl-temba-archives")
-s3-disable-ssl
whether we disable SSL when accessing S3. Should always be set to False unless you're hosting an S3 compatible service within a secure internal network
Expand All @@ -38,7 +38,7 @@ Environment variables:
ARCHIVER_AWS_SECRET_ACCESS_KEY - string
ARCHIVER_DB - string
ARCHIVER_LOG_LEVEL - string
ARCHIVER_S3_ARCHIVE_BUCKET - string
ARCHIVER_S3_BUCKET - string
ARCHIVER_S3_DISABLE_SSL - bool
ARCHIVER_S3_ENDPOINT - string
ARCHIVER_S3_FORCE_PATH_STYLE - bool
Expand Down
4 changes: 2 additions & 2 deletions cmd/rp-archiver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func main() {
s3Client := aws_s3.New(s3Session)

// test out our S3 credentials
err = s3.TestS3(s3Client, config.S3ArchiveBucket)
err = s3.TestS3(s3Client, config.S3Bucket)
if err != nil {
log.WithError(err).Fatal("s3 bucket not reachable")
} else {
Expand Down Expand Up @@ -96,7 +96,7 @@ func main() {
log.WithError(err).Error("error writing archive file")
continue
}
err = archiver.UploadArchive(ctx, s3Client, config.S3ArchiveBucket, &task)
err = archiver.UploadArchive(ctx, s3Client, config.S3Bucket, &task)
if err != nil {
log.WithError(err).Error("error writing archive to s3")
continue
Expand Down
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Config struct {

S3Endpoint string `help:"the S3 endpoint we will write archives to"`
S3Region string `help:"the S3 region we will write archives to"`
S3ArchiveBucket string `help:"the S3 bucket we will write archives to"`
S3Bucket string `help:"the S3 bucket we will write archives to"`
S3DisableSSL bool `help:"whether we disable SSL when accessing S3. Should always be set to False unless you're hosting an S3 compatible service within a secure internal network"`
S3ForcePathStyle bool `help:"whether we force S3 path style. Should generally need to default to False unless you're hosting an S3 compatible service"`

Expand All @@ -22,7 +22,7 @@ func NewConfig() *Config {

S3Endpoint: "https://s3.amazonaws.com",
S3Region: "us-east-1",
S3ArchiveBucket: "dl-temba-archives",
S3Bucket: "dl-temba-archives",
S3DisableSSL: false,
S3ForcePathStyle: false,

Expand Down

0 comments on commit ae6960b

Please sign in to comment.