-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix environment variables #2
base: main
Are you sure you want to change the base?
Conversation
Some environment variables have no effect due to setting the variables to an empty string or a string at the beginning of the code.
I prefer to keep those in place. It’s more for reference than anything else. Some only are used under certain conditions. For example, with caddy CERT_EMAIL is only used with DNS_CERT and STANDALONE_CERT. |
To put it simply, every script shows every variable that it can possibly use (in alphabetical order) and these variables are meant to be edited and then executed. |
If you set environment variables at the beginning of the code as you do currently, user-defined environment variables will have no effect, meaning that if a variable like https://github.com/AppJail-makejails/inventree/blob/main/scripts/admin.sh#L3 |
That is correct. The scripts were designed to necessitate setting the variable within the actual install script. These scripts are developed more toward simplicity and not automation. I do see your point though. |
Ah, I see, but remember that AppJail is an automation project, so if variables need to be changed from code, the Makejail is useless because people can't use settings other than the default ones. I like your idea, but if this doesn't work, I'll unfortunately have to remove the Makejail from the organization. Of course, this doesn't mean that your project can't be used with AppJail, it just means that the Makejail can't be used. |
A simple fix could be to source the environment after the given list, so users could still set them through a .env file. |
This still excludes automation systems or, more specifically, jail managers, not just AppJail but any others that simply pass user-defined options through environment variables. |
I think the best solution is to create a |
So, would simply adding a .env file into each directory, and adding every value in there be enough? That would require fetching both files then. Then source that right off the bat. How would that work with Appjail? |
AppJail will not use that file. What I need is that the scripts do not overwrite the environment variables as it currently happens. The .env file is for the users, but I only said that as a recommendation and it is not really necessary. |
Some environment variables have no effect due to setting the variables to an empty string or a string at the beginning of the code.