-
Notifications
You must be signed in to change notification settings - Fork 8
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
Show warnings / errors for missing environment variables #39
Comments
Hi, I would like to help in this issue |
@HTSagara The installer script doesn't support ARM64 machines just yet as the exit error suggests. An easy way to test the script is to use any VPS of your choice or a run it in a VM instance if you prefer. Here's a post on how to run the validator in a VM |
Hi @kenny-io , thank you for sharing the post on how to run it. I was able to implement the script to check if the variables are not set in the .env. However, can you give me a lead on how to check if they are valid or not? |
@HTSagara great work on getting the variable check working!! For the validity, I'm thinking you could add an addition step to confirm that when the variable is provided, it is valid.
validate_port() {
[[ "$1" =~ ^[0-9]+$ && "$1" -ge 1025 && "$1" -le 65536 ]]
} Does this help give you some direction on next steps? |
Currently, the installer script and entrypoint.sh don't provide clear feedback if required environment variables are missing. This can lead to silent failures or unexpected behavior that's difficult for users to troubleshoot.
Proposed Solution
In the installer.sh script:
In the entrypoint.sh script:
Implementation Details
Create a function to check for the presence of environment variables
Use this function to check for important variables like:
Expected Outcome
Users should receive clear feedback about missing or invalid environment variables.
Mentorship
If you need any help or have questions about this issue feel free to ask in the comments. You can also start a discussion here on Github and our team will be happy to provide the necessary assistance.
The text was updated successfully, but these errors were encountered: