Skip to content

Show warnings / errors for missing environment variables #39

@kenny-io

Description

@kenny-io

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

  1. In the installer.sh script:

    • After creating the .env file, add a check to verify all required variables are set.
    • Display warnings for any missing variables.
  2. In the entrypoint.sh script:

    • At the beginning, add checks for critical environment variables.
    • Log warnings for any missing variables.
    • Optionally, exit with an error if critical variables are missing.

    Implementation Details

  • Create a function to check for the presence of environment variables

  • Use this function to check for important variables like:

    • DASHPASS
    • DASHPORT
    • EXT_IP
    • INT_IP
    • SHMEXT
    • SHMINT
    • minNodes
    • baselineNodes
    • nodesPerConsensusGroup

    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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions