From 5e7cbbd3678d9a4622c9a72d2b216b4f3c1efb99 Mon Sep 17 00:00:00 2001 From: Rafael Soares Date: Thu, 28 Nov 2024 23:57:39 -0300 Subject: [PATCH 1/2] add s3 logs bucket config --- mailroom.go | 1 + runtime/config.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mailroom.go b/mailroom.go index 07cd1dc4e..906be83e8 100644 --- a/mailroom.go +++ b/mailroom.go @@ -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) diff --git a/runtime/config.go b/runtime/config.go index 39c39b54e..034244549 100644 --- a/runtime/config.go +++ b/runtime/config.go @@ -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"` @@ -124,6 +125,7 @@ func NewDefaultConfig() *Config { S3AttachmentsBucket: "attachments-bucket", S3AttachmentsPrefix: "attachments/", S3SessionsBucket: "sessions-bucket", + S3LogsBucket: "logs-bucket", S3DisableSSL: false, S3ForcePathStyle: false, From cb1a74c67916a51354361816d59fbcbc30bdad3e Mon Sep 17 00:00:00 2001 From: Rafael Soares Date: Fri, 29 Nov 2024 00:21:59 -0300 Subject: [PATCH 2/2] add tzdata --- docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3ccbc429d..a1e7eaa32 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,6 +19,8 @@ FROM alpine:3.18 COPY --from=builder /go/bin/ /app/ COPY --from=builder /app/docs /app/docs +RUN apk add --no-cache tzdata + WORKDIR /app EXPOSE 8000