While testing bitwarden I came across a collision with another project also not setting a project name, resulting in both wanting to use "docker_default" for their network and volumes, because docker-compose just uses the directory name the docker-compose.yml file is in. And to just name this "docker" seems quite common.
Could you please add something --project-name bitwarden to your docker-compose calls?
I tested this and it generally works, but people already using volumes will lose access to them if they are not renamed or the data migrated after changing the project name.
Is there not something we can set in the compose file rather than having to pass an argument every time?
Doesn't look like it.
You can either set the name via -p or use COMPOSE_PROJECT_NAME.
See https://github.com/docker/compose/issues/745 and https://github.com/docker/compose/issues/45
A different solution would be to change the name of the bwdata/docker directory to bwdata/bitwarden.
COMPOSE_PROJECT_NAME can also be set in a .env file in the current working directory.
https://docs.docker.com/compose/env-file/
Can be an easy fix 馃憤
Most helpful comment
COMPOSE_PROJECT_NAMEcan also be set in a.envfile in the current working directory.https://docs.docker.com/compose/env-file/
Can be an easy fix 馃憤