Skip to content

Commit

Permalink
add s3 logs bucket config
Browse files Browse the repository at this point in the history
  • Loading branch information
rasoro committed Nov 29, 2024
1 parent b69596d commit 5e7cbbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions mailroom.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func (mr *Mailroom) Start() error {
}
mr.rt.AttachmentStorage = storage.NewS3(s3Client, mr.rt.Config.S3AttachmentsBucket, c.S3Region, s3.BucketCannedACLPublicRead, 32)
mr.rt.SessionStorage = storage.NewS3(s3Client, mr.rt.Config.S3SessionsBucket, c.S3Region, s3.ObjectCannedACLPrivate, 32)
mr.rt.LogStorage = storage.NewS3(s3Client, mr.rt.Config.S3LogsBucket, c.S3Region, s3.ObjectCannedACLPrivate, 32)
} else {
mr.rt.AttachmentStorage = storage.NewFS("_storage/attachments", 0766)
mr.rt.SessionStorage = storage.NewFS("_storage/sessions", 0766)
Expand Down
2 changes: 2 additions & 0 deletions runtime/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type Config struct {
S3AttachmentsBucket string `help:"the S3 bucket we will write attachments to"`
S3AttachmentsPrefix string `help:"the prefix that will be added to attachment filenames"`
S3SessionsBucket string `help:"the S3 bucket we will write attachments to"`
S3LogsBucket string `help:"the S3 bucket we will write logs to"`
S3SessionPrefix string `help:"the prefix that will be added to attachment filenames"`
S3MediaPrefixZendesk string `help:"the prefix that will be added to file attachment names for Zendesk tickets"`
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"`
Expand Down Expand Up @@ -124,6 +125,7 @@ func NewDefaultConfig() *Config {
S3AttachmentsBucket: "attachments-bucket",
S3AttachmentsPrefix: "attachments/",
S3SessionsBucket: "sessions-bucket",
S3LogsBucket: "logs-bucket",
S3DisableSSL: false,
S3ForcePathStyle: false,

Expand Down

0 comments on commit 5e7cbbd

Please sign in to comment.