From 35c8fb2e708382e86f19814d0a526fa8d504f16a Mon Sep 17 00:00:00 2001 From: devthejo Date: Wed, 11 Mar 2026 00:07:50 +0100 Subject: [PATCH] feat(dae): update service ensure public bucket --- services/tasks/src/queues/geodae-publish.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/services/tasks/src/queues/geodae-publish.js b/services/tasks/src/queues/geodae-publish.js index ab2228b..b3310f6 100644 --- a/services/tasks/src/queues/geodae-publish.js +++ b/services/tasks/src/queues/geodae-publish.js @@ -87,6 +87,21 @@ module.exports = async function () { await minio.ensureBucketExists(GEODAE_BUCKET) + // Ensure the bucket allows public (anonymous) downloads + const publicDownloadPolicy = JSON.stringify({ + Version: "2012-10-17", + Statement: [ + { + Sid: "PublicRead", + Effect: "Allow", + Principal: "*", + Action: ["s3:GetObject"], + Resource: [`arn:aws:s3:::${GEODAE_BUCKET}/*`], + }, + ], + }) + await minio.setBucketPolicy(GEODAE_BUCKET, publicDownloadPolicy) + // Upload DB file const dbBuffer = readFileSync(dbPath) await minio.putObject(