Quick fixes.
This commit is contained in:
parent
cce92f5ab3
commit
5444af9400
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue