Use environment variables above .env file #859
erfajpeqwhyk
started this conversation in
Code Discussion
Replies: 1 comment
-
I understand that using an additional file for configuration variables is less preferred than having a separate file. If you want to use env variables instead of the file, you can do this. The server/container environment takes precedence over the .env file. It's important to note that the application needs a custom generated key to properly encrypt sensitive data. This needs to be done before the setup and is automatically done for the provided .env file. The documentation for LinkAce v2 contains information on how to do this without using an .env file. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The documentation mentions that using environment variables is "possible" but "not fully tested and thus not supported". Would it be possible to flip this on its head and support environment instead of a configuration file?
Using a configuration file is a bit awkward when deploying the application as a container (which, from what I've gathered, seems to be the expected way to deploy it).
It adds one more file to edit for a successful deployment, while all options could be just as well defined as environment variables in a Docker Compose of Podman's quadlet file.
It makes editing settings after installation more tedious.
But most importantly, it makes it impossible to host one's complete configuration in a git repo without leaking sensitive information or editing it before pushing it.
On the other hand, using environment variables allows for usage of container secrets, avoiding the presence of passwords as clear text in a file.
Would you be open to consider officially supporting the usage of environment variables above the .env file?
I'm currently playing with the v2 beta, and so far it seems environment variables work fine, but I'd rather not fear this stops working later down the line.
Beta Was this translation helpful? Give feedback.
All reactions