Layr-Labs / eigenda-operator-setup

Quick start setup guide for EigenDA
MIT License
80 stars 78 forks source link

The problem with “$” sign in the password and solutions #36

Closed Mahmood1717 closed 9 months ago

Mahmood1717 commented 10 months ago

When I using the "$" sign in passwords within the .env file for Docker Compose, an error occurs during execution, interpreting it as a variable and causing issues in the form of warnings.

WARN[0000] The "m3a" variable is not set. Defaulting to a blank string.

My passwords contains a dollar sign follwed by “m3a” and it is interpreted as a variable PASSWORD=password$m3a

This is happening because of how docker-compose file reads the password So there’s some solutions

  1. using double dollars: PASSWORD=password$$m3a

  2. using apostrophes or double quotes as you would in it: PASSWORD='password$m3a' PASSWORD=“password$m3a”

  3. using backslashes to escape the special character. PASSWORD=password\$he

  4. using the --env-file option when running docker-compose and pass the path to your .env file directly. docker-compose --env-file /.env_path/.env up

and also I do some research and have an idea:

  1. Maybe if you made some changes in docker-compose.yml file in next version, it completely solves this problem. Please test it and let me know that it is working or not. The changes is using double quotes in yml file under environment and volumes section. Something like below code:

environment:

volumes:

shrimalmadhur commented 9 months ago

this is great. I just had someone verify the double quote password - I will include these changes soon :)