civiform
civiform copied to clipboard
Push images to AWS ECR and have deployment system use those images
We've occasionally hit DockerHub rate limiting, since we pull images unauthenticated. We don't want CEs to have to authenticate with DockerHub, and colocating our images with the rest of the infrastructure in AWS my provide some speed benefits for deployment.
We'll continue to push images to DockerHub for development work, but will modify the GitHub action to also push images to AWS ECR. We'll then modify the deployment system to pull images from AWS ECR rather than DockerHub. As a bonus, this should allow us to use the AWS CLI to find the latest image rather than docker, making the deployment system fully usable from AWS CloudShell and addressing https://github.com/civiform/civiform/issues/5382.
Include a plan for cleaning up old images
Note: Nick introduced a circuit breaker in this PR which prevents the deploy pulling from docker over and over. This is a good bandaid on this issue for now and makes this less urgent.