feat(dae): update service ensure public bucket
All checks were successful
/ build (map[dockerfile:./services/files/Dockerfile name:files]) (push) Successful in 11s
/ build (map[dockerfile:./services/hasura/Dockerfile name:hasura]) (push) Successful in 11s
/ build (map[dockerfile:./services/watchers/Dockerfile name:watchers]) (push) Successful in 10s
/ build (map[dockerfile:./services/web/Dockerfile name:web]) (push) Successful in 11s
/ build (map[dockerfile:./services/api/Dockerfile name:api]) (push) Successful in 13s
/ build (map[dockerfile:./services/app/Dockerfile name:app]) (push) Successful in 12s
/ build (map[dockerfile:./services/tasks/Dockerfile name:tasks]) (push) Successful in 40s
/ deploy (push) Successful in 8s

This commit is contained in:
devthejo 2026-03-11 00:07:50 +01:00
parent 2d454f6ba2
commit 35c8fb2e70
No known key found for this signature in database
GPG key ID: 00CCA7A92B1D5351

View file

@ -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(