I'm planning to use godotenv to setup different environments for my project but I am not sure how to switch between files like dev.env
, uat.env
, prod.env
I want to be able to just pass a value in my Docker command like RUN go build -o my-project --prod .
and have godotenv pickup the relative env file - in this case prod.env
(assuming this is the correct way.
Also, how can I make sure that the other env files don't get included in the build of a particular env.