Skip to content

.env not included in the app build #6936

Closed Answered by FabianLars
seve-andre asked this question in Q&A
Discussion options

You must be logged in to vote

You potentially could bundle it as a resource, but i think this would not be next to the binary in a .deb package.

Also keep in mind that shipping .env files is often not the best idea since then all your users can just read the URL including the password.
If you don't care about that you could look at https://docs.rs/dotenvy_macro/0.15.7/dotenvy_macro/ which will include the env var from the .env file into the binary at build time (still somewhat easy to read but at least not a plain text file)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by seve-andre
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants