fastruby / dotenv_validator

This gem check if required env variables are present and its format using the .env and .env.sample files from Dotenv.
https://www.fastruby.io/blog/open-source/introducing-dotenv-validator.html
MIT License
50 stars 4 forks source link

Add section in README describing workaround when using `dotenv_validator` with Docker #51

Closed mateusdeap closed 2 years ago

mateusdeap commented 2 years ago

Description: Kind of fixes #46. The reason we get this bug is actually only when using docker and the reason is that Docker will parse any .env files present in the project. They do have an option for us to set a custom .env file, and we tried setting it to an empty file, but it would still parse .env and assign values to ENV that included the white space and comments.

We decided to simply update the README to warn users of this issue and that, currently, the only workaround is to remove any comments from the .env file.

I will abide by the code of conduct.

kindoflew commented 2 years ago

Looks good to me, but I wonder if we should test Ariel's idea about changing the name of the file to .env.local as that is an already established naming convention?

mateusdeap commented 2 years ago

@kindoflew Already did and it worked. Added the instruction in the README

kindoflew commented 2 years ago

then looks good to me!

mateusdeap commented 2 years ago

So, I'm new to Github actions, what exactly is happening on that task that keeps failing. I went to the description but it only said it was cancelled and not much in the way of what went wrong...

lubc commented 2 years ago

So, I'm new to Github actions, what exactly is happening on that task that keeps failing. I went to the description but it only said it was cancelled and not much in the way of what went wrong...

@mateusdeap That was recently fixed in https://github.com/fastruby/dotenv_validator/pull/53 You can pull from main so it works on this PR too