mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 09:13:02 +03:00
Some variables from .env file being ignored i.e. ROCKET_PORT #512
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RT-Tap on GitHub.
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.templatefileENABLE_WEBSOCKET=truedoes not work butWEBSOCKET_ENABLE=truedoes 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
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=4084in env fileActual behaviour
Rocket server still starts on port 80 unless environment variable explicitly set through docker-compose
Troubleshooting data
docker logs vaultwardentestWhen set in envfile
when set in docker-compose environment directive
@BlackDex commented on GitHub:
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
-eor customenvironmentsetting works is that it will override the default container environment.The only way we could solve this is by changing
from_pathtofrom_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.