diff --git a/hosting/hosting.properties b/hosting/hosting.properties index 4afdcc044c..35df12f07b 100644 --- a/hosting/hosting.properties +++ b/hosting/hosting.properties @@ -4,7 +4,7 @@ COUCH_DB_PASSWORD=budibase COUCH_DB_USER=budibase WORKER_API_KEY=budibase BUDIBASE_ENVIRONMENT=PRODUCTION -HOSTING_URL="http://localhost" +HOSTING_URL=http://localhost LOGO_URL=https://logoipsum.com/logo/logo-15.svg APP_PORT=4002 WORKER_PORT=4003 diff --git a/packages/worker/src/api/controllers/deploy.js b/packages/worker/src/api/controllers/deploy.js index ad10cc2aae..8a2f8a3ea7 100644 --- a/packages/worker/src/api/controllers/deploy.js +++ b/packages/worker/src/api/controllers/deploy.js @@ -55,12 +55,6 @@ async function getMinioSession() { Bucket: APP_BUCKET, }) .promise() - await objClient - .putBucketPolicy({ - Bucket: APP_BUCKET, - Policy: JSON.stringify(PUBLIC_READ_POLICY), - }) - .promise() } catch (err) { // bucket doesn't exist create it if (err.statusCode === 404) { @@ -69,7 +63,15 @@ async function getMinioSession() { Bucket: APP_BUCKET, }) .promise() - } else { + } else if (err.statusCode === 403) { + await objClient + .putBucketPolicy({ + Bucket: APP_BUCKET, + Policy: JSON.stringify(PUBLIC_READ_POLICY), + }) + .promise() + } + else { throw err } }