Skip to content

Commit c5c240b

Browse files
authored
Merge pull request #131 from Ilhasoft/add-s3-logs-bucket-config
add s3 logs bucket config
2 parents b69596d + cb1a74c commit c5c240b

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

docker/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ FROM alpine:3.18
1919
COPY --from=builder /go/bin/ /app/
2020
COPY --from=builder /app/docs /app/docs
2121

22+
RUN apk add --no-cache tzdata
23+
2224
WORKDIR /app
2325

2426
EXPOSE 8000

mailroom.go

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func (mr *Mailroom) Start() error {
131131
}
132132
mr.rt.AttachmentStorage = storage.NewS3(s3Client, mr.rt.Config.S3AttachmentsBucket, c.S3Region, s3.BucketCannedACLPublicRead, 32)
133133
mr.rt.SessionStorage = storage.NewS3(s3Client, mr.rt.Config.S3SessionsBucket, c.S3Region, s3.ObjectCannedACLPrivate, 32)
134+
mr.rt.LogStorage = storage.NewS3(s3Client, mr.rt.Config.S3LogsBucket, c.S3Region, s3.ObjectCannedACLPrivate, 32)
134135
} else {
135136
mr.rt.AttachmentStorage = storage.NewFS("_storage/attachments", 0766)
136137
mr.rt.SessionStorage = storage.NewFS("_storage/sessions", 0766)

runtime/config.go

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ type Config struct {
5858
S3AttachmentsBucket string `help:"the S3 bucket we will write attachments to"`
5959
S3AttachmentsPrefix string `help:"the prefix that will be added to attachment filenames"`
6060
S3SessionsBucket string `help:"the S3 bucket we will write attachments to"`
61+
S3LogsBucket string `help:"the S3 bucket we will write logs to"`
6162
S3SessionPrefix string `help:"the prefix that will be added to attachment filenames"`
6263
S3MediaPrefixZendesk string `help:"the prefix that will be added to file attachment names for Zendesk tickets"`
6364
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"`
@@ -124,6 +125,7 @@ func NewDefaultConfig() *Config {
124125
S3AttachmentsBucket: "attachments-bucket",
125126
S3AttachmentsPrefix: "attachments/",
126127
S3SessionsBucket: "sessions-bucket",
128+
S3LogsBucket: "logs-bucket",
127129
S3DisableSSL: false,
128130
S3ForcePathStyle: false,
129131

0 commit comments

Comments
 (0)