Dotenv files¶
See also direnv.md how to auto-load .env files
Source .env from bash¶
Best solution so far:
Using export (is able to ignores comments):
Also handles values with spaces, but beware:
-d is not supported in busybox (i.e. some Gitlab CI containers):
Source dotenv file in Gitlab CI¶
Add this command to the beginning of the job script: