Replicate Encodex deployment in the new AWS account - #14
Merged
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Replicates the existing Encodex single-node EC2/k3s deployment into a new AWS account, shifting deployments from static AWS keys/SSH to GitHub OIDC + SSM, and documenting the infra + cutover process.
Changes:
- Updates the GitHub Actions deployment workflow to use OIDC credentials, push to ECR, run Prisma migrations, and deploy via SSM Run Command.
- Adds a CloudFormation template (EC2 + k3s + Caddy + ECR + IAM/OIDC + Elastic IP) plus AWS replica deployment documentation.
- Adjusts the Kubernetes deployment manifest to use a workflow-substituted image reference and adds a
.dockerignore.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| k8s/deployment.yml | Replaces hard-coded ECR image with a workflow-substituted reference. |
| infra/aws/README.md | Documents provisioning, GitHub config, validation, and DNS cutover steps. |
| infra/aws/encodex-replica.yml | Adds CloudFormation stack for EC2/k3s/Caddy/ECR/OIDC/SSM + Elastic IP. |
| .github/workflows/deploy.yml | Migrates deployment to GitHub OIDC + SSM, adds migration + ECR push logic. |
| .dockerignore | Reduces Docker build context and avoids copying secrets/artifacts into images. |
Suppressed comments (1)
.github/workflows/deploy.yml:76
- This workflow still pushes the mutable
:latesttag. If the intent is immutable deployments (and/or ECR tag immutability), this push should be removed.
docker push "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
docker push "$ECR_REGISTRY/$ECR_REPOSITORY:latest"
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+22
to
+24
| # The deployment workflow replaces this neutral image reference with | ||
| # the immutable ECR image URI for the target AWS account. | ||
| image: encodex:latest |
Comment on lines
+60
to
+62
| --tag "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" \ | ||
| --tag "$ECR_REGISTRY/$ECR_REPOSITORY:latest" \ | ||
| . |
Comment on lines
+56
to
+60
| docker build \ | ||
| -f docker/Dockerfile \ | ||
| --build-arg DATABASE_URL \ | ||
| --build-arg JWT_SECRET \ | ||
| --tag "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" \ |
Comment on lines
+53
to
+55
| RepositoryName: encodex | ||
| ImageTagMutability: MUTABLE | ||
| ImageScanningConfiguration: |
Comment on lines
+154
to
+155
| CreditSpecification: | ||
| CPUCredits: unlimited |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Verification