Closed tmbrwn closed 2 years ago
This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 7 days if no further activity occurs. Thanks!
This issue was closed because it had no activity for over 1 year.
Bug: environment variables are overridden by file-based configuration
Current Behavior
GoTrue will ignore any parameters passed in through the environment if the same parameter is specified in a
.env
file as well. This is contrary to the documentation, which states that environment variables take precedence over file-based configuration.The issue appears to be due to https://github.com/gobuffalo/envy/issues/36. Envy is a dependency of github.com/gobuffalo/pop, which is a dependency of this project.
Workarounds
The issue with envy applies to any parameters specified in a file called
.env
. If no such file exists, and any configuration is done with another file and referenced withgotrue -c some-other-config-file
, then configuration will function as intended.Steps to Reproduce
.env
(the content of the
.env
is not too important but this is an example with all required parameters set)Invocation:
GOTRUE_DB_DATABASE_URL=root@tcp(someotherhost:3306)/gotrue_development?multiStatements=true&parseTime=true ./gotrue
Result: GoTrue attempts to reach the database at
localhost:3306
rather thansomeotherhost:3306
. (built usinggo1.16.3 darwin/amd64
)