WIP: Make deployment scripts handle multi-environment deployment #140
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.
Overview
The existing deployment setup relied on single
.env
,.api-id
andclaudia.json
files, so supporting multiple environments required shuffling different copies around and copying them onto those filenames, which incurs risk of confusion and error.This uses the upcoming
--env-file
option fordocker-compose
to use the same basic.env
-based deployment but make it support multiple remote environments.This PR is WIP and not ready for merging because the
--env-file
option fordocker-compose
is in the v1.25 release candidate but not yet in a released version.Also WIP because I need to revise the README to reflect these changes.
Demo
TK
Notes
tfstate
files by environment. But the storage backend is stilllocal
(the default), not S3. Thetfstate
file is important to keep. Without it, Terraform doesn't know how to find the existing CloudFront distribution, so it will make a new one. So if this were going to be used in a situation where multiple people might deploy it, it would need to be switched to S3-backed, or some other way of sharing thetfstate
files would need to be set up.Testing Instructions
TK
Related to #129 (comment)