You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deployment-platforms/rest-express-docker-aws-ec2/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,4 +160,4 @@ In your repository, go to **Settings → Secrets and variables → Actions** and
160
160
161
161
### 3. How deployment works
162
162
163
-
Pushing to `main` triggers [`.github/workflows/deploy.yml`](./.github/workflows/deploy.yml). The workflowauthenticates with AWS, builds a Docker image using Buildx (with GitHub Actions layer caching for faster rebuilds) and pushes it to ECR tagged with both the commit SHA and `latest`. It then SSHs into your EC2 instance, pulls the new image, gracefully stops and removes the old container if one exists, starts the new one with `DATABASE_URL` injected at runtime, waits 5 seconds and verifies the container is running — printing logs and exiting non-zero if it isn't. Finally it prunes old images to keep the EC2 disk clean.
163
+
Copy [`.github/workflows/deploy.yml`](./.github/workflows/deploy.yml) to `.github/workflows/` at the root of **your own repository**. Pushing to `main` then triggers the workflow. It authenticates with AWS, builds a Docker image using Buildx (with GitHub Actions layer caching for faster rebuilds) and pushes it to ECR tagged with both the commit SHA and `latest`. It then SSHs into your EC2 instance, runs `prisma migrate deploy` against your production database using a one-off container, pulls the new image, gracefully stops and removes the old container if one exists, starts the new one with `DATABASE_URL` injected at runtime, waits 5 seconds and verifies the container is running — printing logs and exiting non-zero if it isn't. Finally it prunes old images to keep the EC2 disk clean.
0 commit comments