Use VAPOR_ENV for non-standard environment option #176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Vapor lets you set up multiple environments, each with its own name. While they are different environments, they may all still run in "production mode" with
APP_ENV=production
. But the encrypted environment variables each Vapor environment needs will be different.The issue is that the naming convention of
.env.production.encrypted
in the root of the repository does not allow for storing encrypted environment variables for multiple Vapor environments that run in production mode.This PR introduces
VAPOR_ENV
to mirror the environment name used for each Vapor environment. (In our case, we usedev
,demo
andproduction
-- sometimesstaging
.) FWIW we useSTAGE
as the environment variable to distinguish environments, butVAPOR_ENV
would be less opinionated.