The existing deployment setup relied on single .env, .api-id and claudia.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 for docker-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 for docker-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
The changes include making Terraform use separate tfstate files by environment. But the storage backend is still local (the default), not S3. The tfstate 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 the tfstate files would need to be set up.
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 https://github.com/azavea/tilegarden/issues/129#issuecomment-490729633