deploy-stack 0.14.1 โ 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/commands/destroy.js +3 -1
- package/templates/README.md +14 -6
- package/release_notes.md +0 -20
package/README.md
CHANGED
|
@@ -124,6 +124,7 @@ your-project/
|
|
|
124
124
|
## ๐ฆ Reference Implementations
|
|
125
125
|
|
|
126
126
|
* **[Next.js Fullstack App](https://github.com/anton-codes-iac/deploy-stack-nextjs-example):** A complete Next.js deployment showcasing the generated Terraform, CloudFront setup, and automated OIDC workflow.
|
|
127
|
+
* **[Vercel to AWS Migration (Next.js)](https://github.com/anton-codes-iac/deploy-stack-vercel-nextjs-example):** Demonstrates automatic translation of Vercel edge routing (`vercel.json`) to native AWS Application Load Balancer rules.
|
|
127
128
|
* **[Express.js API](https://github.com/anton-codes-iac/deploy-stack-express-example):** A standard Node.js backend setup.
|
|
128
129
|
* **[Python FastAPI](https://github.com/anton-codes-iac/deploy-stack-fastapi-example):** A Python API demonstrating unprivileged port mapping.
|
|
129
130
|
* **[Vite / React SPA](https://github.com/anton-codes-iac/deploy-stack-vite-example):** Demonstrates SPA routing and `dist/` auto-detection.
|
package/package.json
CHANGED
package/src/commands/destroy.js
CHANGED
|
@@ -100,8 +100,10 @@ export async function destroyStack() {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
// 3. Clean up the S3 State Bucket
|
|
103
|
+
let deleteS3Bucket = false;
|
|
104
|
+
|
|
103
105
|
if (bucketName) {
|
|
104
|
-
|
|
106
|
+
deleteS3Bucket = await confirm({
|
|
105
107
|
message: color.yellow(`AWS compute resources destroyed. Do you also want to permanently delete the S3 state bucket?\n (Select 'No' if you plan to run 'deploy-stack apply' later to spin this back up.)`),
|
|
106
108
|
initialValue: false,
|
|
107
109
|
});
|
package/templates/README.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
>
|
|
5
5
|
> It contains a production-ready AWS ECS Fargate architecture and a zero-secret GitHub Actions deployment pipeline.
|
|
6
6
|
|
|
7
|
+
## ๐๏ธ Architecture Overview
|
|
8
|
+
|
|
9
|
+
Your application has been configured for an enterprise-grade AWS deployment. Instead of relying on a black-box PaaS, you now own the underlying infrastructure:
|
|
10
|
+
* **Compute:** Your app is packaged into a Docker container and runs on **AWS ECS Fargate** (Serverless compute, meaning no EC2 instances to manage).
|
|
11
|
+
* **Networking:** Traffic flows through an **Application Load Balancer (ALB)**, which sits inside a custom VPC across multiple Availability Zones for high availability.
|
|
12
|
+
* **Security:** Deployments are handled via GitHub Actions using **AWS IAM OIDC**. This means GitHub securely requests temporary tokens to deploy your codeโno long-lived AWS keys are stored anywhere.
|
|
13
|
+
* **State Management:** Terraform state is securely backed by an encrypted S3 bucket with DynamoDB locking.
|
|
14
|
+
|
|
7
15
|
## ๐ฐ Cost Estimate & Disclaimer
|
|
8
16
|
|
|
9
17
|
This infrastructure provisions a highly available Application Load Balancer (ALB) and an ECS Fargate container (Size: **{{COMPUTE_TIER}}**).
|
|
@@ -16,11 +24,11 @@ This infrastructure provisions a highly available Application Load Balancer (ALB
|
|
|
16
24
|
## ๐ Deployment Guide
|
|
17
25
|
|
|
18
26
|
1. **Initial Provisioning:**
|
|
27
|
+
Ensure you have configured your AWS CLI locally, then run the native deploy command:
|
|
19
28
|
```bash
|
|
20
|
-
|
|
21
|
-
terraform init
|
|
22
|
-
terraform apply
|
|
29
|
+
npx deploy-stack apply
|
|
23
30
|
```
|
|
31
|
+
*(Alternatively, run `cd terraform && terraform init && terraform apply`)*
|
|
24
32
|
|
|
25
33
|
2. **Push Secrets (Optional):**
|
|
26
34
|
If your application requires environment variables, create a local `.env` file and sync it directly to AWS Secrets Manager:
|
|
@@ -28,8 +36,8 @@ This infrastructure provisions a highly available Application Load Balancer (ALB
|
|
|
28
36
|
npx deploy-stack secrets push .env
|
|
29
37
|
```
|
|
30
38
|
|
|
31
|
-
3. **Automated CI/CD
|
|
32
|
-
Push this repository to GitHub. Your deployment pipeline uses the official [deploy-stack GitHub Action](https://github.com/marketplace/actions/deploy-stack-aws-fargate-terraform-deploy)
|
|
39
|
+
3. **Automated CI/CD:**
|
|
40
|
+
Push this repository to GitHub. Your deployment pipeline uses the official [deploy-stack GitHub Action](https://github.com/marketplace/actions/deploy-stack-aws-fargate-terraform-deploy). Every push to `{{DEPLOY_BRANCH}}` will automatically run your infrastructure changes, build your container, and deploy your application.
|
|
33
41
|
|
|
34
42
|
### โ ๏ธ Troubleshooting: OIDC Provider Already Exists
|
|
35
43
|
AWS only permits one GitHub Actions OIDC provider per AWS account. If `terraform apply` fails with an `EntityAlreadyExists` error regarding the OIDC provider, it indicates GitHub Actions was previously configured in this account.
|
|
@@ -42,7 +50,7 @@ variable "create_oidc_provider" {
|
|
|
42
50
|
default = false # <--- Change this from true to false
|
|
43
51
|
}
|
|
44
52
|
```
|
|
45
|
-
Re-run `
|
|
53
|
+
Re-run `npx deploy-stack apply` to link directly to your existing provider.
|
|
46
54
|
|
|
47
55
|
## ๐ Safe Teardown (Destroying the Stack)
|
|
48
56
|
|
package/release_notes.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# ๐ The Documentation & Contextual UX Update
|
|
2
|
-
|
|
3
|
-
This patch release focuses entirely on Developer Experience (DX), ensuring that users migrating from PaaS platforms have clear, actionable documentation for AWS-native concepts right when they need them.
|
|
4
|
-
|
|
5
|
-
### ๐ What's New
|
|
6
|
-
* **PaaS Escape Hatch Guides:** Added step-by-step guides for decoupling frontend frameworks from Vercel's proprietary edge network:
|
|
7
|
-
* **Next.js:** Enforcing `output: 'standalone'` for standard Docker deployments.
|
|
8
|
-
* **SvelteKit:** Swapping `@sveltejs/adapter-auto` or the Vercel adapter for the official Node adapter.
|
|
9
|
-
* **Astro:** Replacing `@astrojs/vercel` with `@astrojs/node`.
|
|
10
|
-
* **Comprehensive AWS Migration Guides:** Added dedicated documentation for our core backend engines:
|
|
11
|
-
* **Heroku Migration:** Detailed breakdown of how `Procfile` `web` and `worker` processes map to AWS Fargate and private subnets.
|
|
12
|
-
* **Secrets Management:** A deep dive into how `deploy-stack` leverages AWS Secrets Manager to inject environment variables at runtime.
|
|
13
|
-
* **Database Scaffolding:** Explains our zero-trust PostgreSQL architecture and auto-injected connection strings.
|
|
14
|
-
|
|
15
|
-
### ๐ ๏ธ CLI UX Enhancements
|
|
16
|
-
* **Context-Aware Documentation Links:** The CLI now dynamically injects links to the relevant documentation at the exact moment a user might need it.
|
|
17
|
-
* If a Vercel-locked Next.js, SvelteKit, or Astro config is detected, the CLI links directly to the respective migration fix.
|
|
18
|
-
* If a `Procfile` is detected, the `deploy-stack` outro links to the Heroku guide.
|
|
19
|
-
* If a database is provisioned, the outro links to the database connection guide.
|
|
20
|
-
* Running `deploy-stack secrets push` now outputs a direct link explaining how those secrets reach the Fargate containers.
|