mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Application Config is Env Var Order Dependant #233
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 @mohammed90 on GitHub (Feb 16, 2019).
This is a weird bug that threw me off for a long time. At first I thought it might be related to #359, but now it seems like something else. The docker-compose file here doesn't enable the
/adminpath, despite the ADMIN_TOKEN being set. You'll keep getting 404. It's definitely set because it shows when I ranenvinside the container.Here's where it gets freaky, it works if I move the
ADMIN_TOKENto the top of the list, i.e. beforeROCKET_PORT.I ran
envinside the container and the ADMIN_TOKEN variable is set:@mprasil commented on GitHub (Feb 16, 2019):
Can you start with docker compose that has the
ADMIN_TOKENin the wrong place and see if you really see the variable in thedocker inspectoutput?I can't imagine a scenario where the order of the variables would matter, because at the end of the day they are just variables set for the process and as such they don't really have order. And if it does, this really sounds like docker-compose problem. But let's see if something else is at play here.
@dani-garcia commented on GitHub (Feb 16, 2019):
I had a similar problem with the .env file, I was setting the SMTP_FROM_NAME as a value with spaces but no quotes, and that broke the env loading, any variables after that one would stop loading.
Like this would make the third one not load:
That was specific about the .env file, but maybe this is similar?
Otherwise, I have no idea where this could come from, the order the variables are set doesn't influence anything.
I would do what @mprasil said, and I'd also test if it only works on the first position. Do something like move it one position back each time to see when it breaks.
@mohammed90 commented on GitHub (Feb 16, 2019):
Okay, I'm not able to reproduce it now even though I was able to do it constantly before creating the issue. Not sure whether I unknowingly changed something more. Anyways, I'll close this now and will come back with more stuff if it recurs.