Unable to set up s3 storage adapter
Solved
Directus
-
Hi all.
In my Directus .env file, i've tried to configure Storage adapter = Digitalocean.
This is the configuration that i've used (which works fine for me in multiple other non-Cloudron Directus instances) :
STORAGE_LOCATIONS="string:DIGITALOCEAN" STORAGE_DIGITALOCEAN_DRIVER="s3" STORAGE_DIGITALOCEAN_ROOT="./Directus" STORAGE_DIGITALOCEAN_PUBLIC_URL="/Directus" STORAGE_DIGITALOCEAN_KEY="key" STORAGE_DIGITALOCEAN_SECRET="secret" STORAGE_DIGITALOCEAN_BUCKET="bucket-name" STORAGE_DIGITALOCEAN_REGION="region" STORAGE_DIGITALOCEAN_ENDPOINT="region.digitaloceanspaces.com"
This is the error i'm getting in the console:
Nov 21 16:01:40 [10:31:40] WARN (75 on 449d86bb-a58d-41fa-90b3-1b6d9be048a1): Couldn't save file c4d112d0-80c3-4549-9f3f-ce7aed8a98a9.jpeg Nov 21 16:01:40 [10:31:40] WARN (75 on 449d86bb-a58d-41fa-90b3-1b6d9be048a1): E_INVALID_CONFIG: Make sure to define driver for DIGITALOCEAN disk Nov 21 16:01:40 err: { Nov 21 16:01:40 "type": "InvalidConfig", Nov 21 16:01:40 "message": "E_INVALID_CONFIG: Make sure to define driver for DIGITALOCEAN disk", Nov 21 16:01:40 "stack": Nov 21 16:01:40 InvalidConfig: E_INVALID_CONFIG: Make sure to define driver for DIGITALOCEAN disk Nov 21 16:01:40 at Function.missingDiskDriver (/app/code/node_modules/@directus/drive/dist/exceptions/InvalidConfig.js:16:16) Nov 21 16:01:40 at StorageManager.disk (/app/code/node_modules/@directus/drive/dist/StorageManager.js:57:46) Nov 21 16:01:40 at FilesService.uploadOne (/app/code/node_modules/directus/dist/services/files.js:85:37) Nov 21 16:01:40 at processTicksAndRejections (node:internal/process/task_queues:96:5) Nov 21 16:01:40 at async Multipart.<anonymous> (/app/code/node_modules/directus/dist/controllers/files.js:77:32) Nov 21 16:01:40 }
How to resolve this?
-
@shrey did you forget to add the
export
in each line? It should like the below in/app/data/env
:export STORAGE_LOCATIONS="string:DIGITALOCEAN"
(For all the lines). Cloudron does not use the .env setup (didn't know upstream supported it).
-