this_is_router@feddit.detoSelfhosted@lemmy.world•Learning by doing: How to change the folder in docker compose (vaultwarden)English
5·
1 year agoJust to correct a mistake: - ./vaultwarden:/data/ means that the folder /data/ of the container is in the subfolder vaultwarden inside the folder that contains the docker-compose.yml. it is not located in /. for that you need to remove the leading “.”
If you remove ./ vaultwarden points to a volume named vaultwarden that need to be defined separately:
./vaultwarden = relativ path from the docker-compose folder
/vaultwarden = absolut path /
vaultwarden = a volume called vaultwarden
It’s more like quick and dirty. I generally try to create a volume and save the data outside the compose folder. Default is /var/lib/docker/volumes if I remember correctly.