If you just want to change the database location, you can map the path inside the container to your desired path outside of the container with
services:
db:
volumes:
- /desired/path:/var/lib/postgresql/data
To do this change, shutdown the containers, do the change, start the server back up and do a re-upload from one joplin application. Always make sure you have a backup of your data before changing any server configuration.
If you'd like to have contents and attachments separated, follow this link: joplin/packages/server/README.md at dev · laurent22/joplin · GitHub .
You will end up with something looking like this:
services:
db:
volumes:
- /desired/path/for/joplin-data:/var/lib/postgresql/data
app:
volumes:
- /desired/path/for/joplin-content:/home/content
- STORAGE_DRIVER=Type=Filesystem; Path=/home/content
Edits because of misclicks