Closed RT-Tap closed 7 months ago
I do not think we can fix this. The env's are loaded in a order, and the one which is last will probably override the previously set items.
The problem here is that the env of the container it self is not overridden when loading the .env file.
It currently checks if there already is an env value assigned, if so, it will not re-assign.
The reason a -e
or custom environment
setting works is that it will override the default container environment.
The only way we could solve this is by changing from_path
to from_path_override
, but that probably would be a breaking change as it might cause issues for other users.
So, it's not really an issue, as this is how it is designed.
Subject of the issue
ROCKET_PORT inside .env file is ignored possibly others - i know there was an announcement about getting rid of websockets but I did notice that the default variable mentioned in the
.env.template
fileENABLE_WEBSOCKET=true
does not work butWEBSOCKET_ENABLE=true
does work. Because it's depreciated it shouldnt matter but I figured I would mention it as well. Others that I have changed (in the env file) and can confirm worked fine:Deployment environment
docker compose in namespace isolated docker hence needing to use a non privileged port
vaultwarden version: docker hub image library:latest == 1.30.5
Install method: docker compose
Clients used: not applicable
Reverse proxy and version: not applicable
MySQL/MariaDB or PostgreSQL version: not applicable
Other relevant details:
Steps to reproduce
docker-compose.yml
.envfile
Expected behaviour
Rocket server start on port 4084 when using
ROCKET_PORT=4084
in env fileActual behaviour
Rocket server still starts on port 80 unless environment variable explicitly set through docker-compose
Troubleshooting data
docker logs vaultwardentest
When set in envfilewhen set in docker-compose environment directive