Hi everyone,
I’m trying to run Directus with Docker Compose and I’d like to know if anyone has successfully made a setup with only one Docker named volume for everything:
-
PostgreSQL data
-
Directus uploads
-
Directus extensions
My goal is to have a single volume to back up easily to S3.
Ideally, I would like something like this conceptually:
volumes:
directus_data:
And inside that volume, have separate folders like:
directus_data/
├─ database/
├─ uploads/
└─ extensions/
I tried Docker Compose volume.subpath, but it fails because the subfolders must already exist inside the volume before the containers start.
I also tried mounting the same named volume directly to multiple paths, but that causes permission issues between PostgreSQL and Directus. Directus shows warnings like:
Upload directory is not read/writeable
Extensions directory is not readable
EACCES: permission denied, scandir ‘/directus/extensions’
My constraints are:
-
One Docker Compose file
-
Only one Docker named volume
-
No bind mounts
-
No manual folder creation
-
No init container or shell command just to create/chown folders
-
Preferably keep Directus/Postgres default paths if possible
Has anyone managed to make this work cleanly?