deploy-stack 0.14.0 β 0.14.2
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 +10 -0
- package/docs/guides/database-connections.md +27 -0
- package/docs/guides/secrets-management.md +24 -0
- package/docs/migration/astro-vercel-to-aws.md +47 -0
- package/docs/migration/heroku-procfile-to-aws.md +32 -0
- package/docs/migration/nextjs-vercel-to-aws.md +43 -0
- package/docs/migration/sveltekit-vercel-to-aws.md +55 -0
- package/package.json +1 -1
- package/release_notes.md +7 -0
- package/src/commands/init.js +24 -16
- package/src/commands/secrets.js +1 -0
- package/templates/README.md +14 -6
- package/release-notes.md +0 -14
package/README.md
CHANGED
|
@@ -51,6 +51,15 @@ You retain complete ownership of your infrastructure code without relying on bla
|
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
+
## π Documentation & Guides
|
|
55
|
+
Transitioning from PaaS to AWS involves a few architectural shifts. We've written concise guides to help you understand how `deploy-stack` handles the heavy lifting:
|
|
56
|
+
* [Migrating from Heroku to AWS (Procfile Support)](./docs/migrations/heroku-procfile-to-aws.md)
|
|
57
|
+
* [Managing Secrets & Environment Variables](./docs/guides/secrets-management.md)
|
|
58
|
+
* [Zero-Trust Database Connections](./docs/guides/database-connections.md)
|
|
59
|
+
* [Migrating Next.js from Vercel](./docs/migrations/nextjs-vercel-to-aws.md)
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
54
63
|
## π Quick Start
|
|
55
64
|
|
|
56
65
|
Run the CLI directly in your project root:
|
|
@@ -115,6 +124,7 @@ your-project/
|
|
|
115
124
|
## π¦ Reference Implementations
|
|
116
125
|
|
|
117
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.
|
|
118
128
|
* **[Express.js API](https://github.com/anton-codes-iac/deploy-stack-express-example):** A standard Node.js backend setup.
|
|
119
129
|
* **[Python FastAPI](https://github.com/anton-codes-iac/deploy-stack-fastapi-example):** A Python API demonstrating unprivileged port mapping.
|
|
120
130
|
* **[Vite / React SPA](https://github.com/anton-codes-iac/deploy-stack-vite-example):** Demonstrates SPA routing and `dist/` auto-detection.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Managed Database Connections
|
|
2
|
+
|
|
3
|
+
When you run `npx deploy-stack` for a backend framework (Node, Django, Rails, Go, etc.), the CLI prompts you to automatically provision a managed AWS RDS PostgreSQL database.
|
|
4
|
+
|
|
5
|
+
## Zero-Trust Architecture
|
|
6
|
+
|
|
7
|
+
If you select "Yes", `deploy-stack` builds a true zero-trust network topology:
|
|
8
|
+
1. The PostgreSQL instance is deployed into heavily restricted **Isolated Subnets**.
|
|
9
|
+
2. It is given a strict Security Group that *only* allows inbound traffic from your specific ECS Fargate containers on port `5432`.
|
|
10
|
+
3. The database is completely inaccessible from the public internet.
|
|
11
|
+
|
|
12
|
+
## Auto-Injected Environment Variables
|
|
13
|
+
|
|
14
|
+
You do not need to configure database connection strings manually. The generated Terraform automatically creates a secure, random master password in AWS Secrets Manager and injects the following environment variables directly into your running containers:
|
|
15
|
+
|
|
16
|
+
* `DB_HOST` (The internal AWS DNS endpoint)
|
|
17
|
+
* `DB_PORT` (5432)
|
|
18
|
+
* `DB_NAME` (Your auto-generated database name)
|
|
19
|
+
* `DB_USER` (Injected securely at runtime)
|
|
20
|
+
* `DB_PASSWORD` (Injected securely at runtime)
|
|
21
|
+
|
|
22
|
+
To connect your application, simply configure your ORM (Prisma, Django, TypeORM, Active Record) to read from these standard environment variables.
|
|
23
|
+
|
|
24
|
+
## Running Database Migrations
|
|
25
|
+
|
|
26
|
+
Because the database is in an isolated subnet, you cannot run schema migrations directly from your local laptop.
|
|
27
|
+
The best practice is to configure your CI/CD pipeline or your Docker container's startup script to run your migrations (e.g., `npx prisma deploy` or `python manage.py migrate`) before starting the main web process.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Secrets Management in deploy-stack
|
|
2
|
+
|
|
3
|
+
Managing `.env` files across a team and syncing them to the cloud is a notorious pain point. `deploy-stack` solves this by natively integrating with **AWS Secrets Manager**, ensuring zero plaintext secrets ever touch your GitHub repository or CI/CD pipelines.
|
|
4
|
+
|
|
5
|
+
## Pushing Secrets to AWS
|
|
6
|
+
|
|
7
|
+
Instead of manually clicking through the AWS Console, use the built-in secrets command:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx deploy-stack secrets push .env.production
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### What happens under the hood?
|
|
14
|
+
1. The CLI reads your local `.env.production` file.
|
|
15
|
+
2. It encrypts the key-value pairs and pushes them securely into AWS Secrets Manager under your project's namespace (e.g., `my-project-secrets`).
|
|
16
|
+
3. It generates a local `terraform/secret_keys.json` file containing *only the names* of your keys (e.g., `["API_KEY", "STRIPE_SECRET"]`), **not the values**.
|
|
17
|
+
|
|
18
|
+
## How Secrets Reach Your App
|
|
19
|
+
|
|
20
|
+
When you commit `terraform/secret_keys.json` and push to GitHub, your CI/CD pipeline runs Terraform.
|
|
21
|
+
|
|
22
|
+
Terraform reads the JSON array of key names and dynamically maps them to your ECS Task Definition. When your AWS Fargate container boots up, it automatically injects those secrets directly into your application's environment as standard environment variables (e.g., `process.env.STRIPE_SECRET` or `os.getenv("API_KEY")`).
|
|
23
|
+
|
|
24
|
+
*Note: Because Terraform maps the secrets at runtime, updating a secret value in AWS and running an empty GitHub deployment will instantly cycle your containers with the new keys!*
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Migrating Astro from Vercel to AWS Fargate
|
|
2
|
+
|
|
3
|
+
If you are seeing a warning from `deploy-stack` about your Astro adapter, it means your project is currently configured to build specifically for Vercel's proprietary serverless network.
|
|
4
|
+
|
|
5
|
+
To deploy Astro as a containerized application on standard AWS infrastructure, you simply need to switch to Astro's official Node.js adapter.
|
|
6
|
+
|
|
7
|
+
## How to Fix
|
|
8
|
+
|
|
9
|
+
### 1. Install the Node adapter
|
|
10
|
+
Run the following command in your terminal to swap out the Vercel adapter for the Node adapter:
|
|
11
|
+
|
|
12
|
+
\`\`\`bash
|
|
13
|
+
npm install @astrojs/node
|
|
14
|
+
npm uninstall @astrojs/vercel
|
|
15
|
+
\`\`\`
|
|
16
|
+
|
|
17
|
+
### 2. Update `astro.config.mjs`
|
|
18
|
+
Open your Astro configuration file and replace the Vercel import with the Node import.
|
|
19
|
+
|
|
20
|
+
**Before (Vercel Lock-in):**
|
|
21
|
+
\`\`\`javascript
|
|
22
|
+
import { defineConfig } from 'astro/config';
|
|
23
|
+
import vercel from '@astrojs/vercel/serverless';
|
|
24
|
+
|
|
25
|
+
export default defineConfig({
|
|
26
|
+
output: 'server',
|
|
27
|
+
adapter: vercel(),
|
|
28
|
+
});
|
|
29
|
+
\`\`\`
|
|
30
|
+
|
|
31
|
+
**After (AWS Ready):**
|
|
32
|
+
\`\`\`javascript
|
|
33
|
+
import { defineConfig } from 'astro/config';
|
|
34
|
+
import node from '@astrojs/node';
|
|
35
|
+
|
|
36
|
+
export default defineConfig({
|
|
37
|
+
output: 'server',
|
|
38
|
+
adapter: node({
|
|
39
|
+
mode: 'standalone'
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
\`\`\`
|
|
43
|
+
|
|
44
|
+
### 3. Deploy
|
|
45
|
+
That's it! Your Astro app is now decoupled from Vercel.
|
|
46
|
+
|
|
47
|
+
Run `npx deploy-stack apply` and the CLI will automatically package this standalone Node server into a hardened Docker container and deploy it to your AWS cluster.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Migrating from Heroku to AWS (Procfile Support)
|
|
2
|
+
|
|
3
|
+
When migrating from Heroku or Render, you likely rely on a `Procfile` to define your application's architecture (e.g., a web server and a background worker like Celery or Sidekiq).
|
|
4
|
+
|
|
5
|
+
`deploy-stack` natively understands Heroku `Procfile` syntax and automatically translates it into a production-grade, multi-container AWS architecture.
|
|
6
|
+
|
|
7
|
+
## How it Works
|
|
8
|
+
|
|
9
|
+
When you run `npx deploy-stack`, the CLI scans your root directory for a `Procfile`.
|
|
10
|
+
|
|
11
|
+
### The `web` Process
|
|
12
|
+
If the CLI detects a `web:` declaration:
|
|
13
|
+
1. It overrides the default Docker `CMD`.
|
|
14
|
+
2. It provisions an AWS ECS Fargate service for this process.
|
|
15
|
+
3. It automatically wires this specific container to your public-facing Application Load Balancer (ALB) so it can receive internet traffic.
|
|
16
|
+
|
|
17
|
+
### The `worker` Process
|
|
18
|
+
If the CLI detects a `worker:` declaration:
|
|
19
|
+
1. It generates a completely separate ECS Fargate task definition (`worker.tf`).
|
|
20
|
+
2. It spins up the worker in a **fully isolated private subnet**.
|
|
21
|
+
3. It intentionally strips all public ingress, ensuring your background workers are secure and can only communicate with your database or message brokers internally.
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
**Your `Procfile`:**
|
|
26
|
+
```text
|
|
27
|
+
web: gunicorn myapp.wsgi
|
|
28
|
+
worker: celery -A myapp worker -l info
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**The Result:**
|
|
32
|
+
Running `deploy-stack` will automatically generate the Terraform required to spin up both containers simultaneously from the exact same Docker image, scaling them independently based on your needs.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Migrating Next.js from Vercel to AWS Fargate
|
|
2
|
+
|
|
3
|
+
If you are seeing a warning from `deploy-stack` about `output: 'standalone'`, your Next.js configuration is missing a crucial setting required for containerized environments.
|
|
4
|
+
|
|
5
|
+
By default, Next.js requires your entire `node_modules` folder to run the production server. This creates massive, bloated Docker containers that boot slowly and cost more to host. The `standalone` output mode tells Next.js to trace your code and bundle *only* the specific files and dependencies actually used in production, creating an ultra-lean deployment artifact.
|
|
6
|
+
|
|
7
|
+
## How to Fix
|
|
8
|
+
|
|
9
|
+
### 1. Update `next.config.js` (or `.mjs` / `.cjs`)
|
|
10
|
+
Open your Next.js configuration file in the root of your project and add `output: 'standalone'` to the configuration object.
|
|
11
|
+
|
|
12
|
+
**Before (Vercel Default):**
|
|
13
|
+
```javascript
|
|
14
|
+
/** @type {import('next').NextConfig} */
|
|
15
|
+
const nextConfig = {
|
|
16
|
+
reactStrictMode: true,
|
|
17
|
+
// Other existing config...
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default nextConfig;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**After (AWS Ready):**
|
|
24
|
+
```javascript
|
|
25
|
+
/** @type {import('next').NextConfig} */
|
|
26
|
+
const nextConfig = {
|
|
27
|
+
reactStrictMode: true,
|
|
28
|
+
output: 'standalone', // <-- Add this line
|
|
29
|
+
// Other existing config...
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default nextConfig;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. (Optional) Define a Health Check Route
|
|
36
|
+
AWS Application Load Balancers require a route to ping to ensure your app is healthy. If you don't already have one, create a simple API route in your app (e.g., `app/api/health/route.ts` for App Router, or `pages/api/health.ts` for Pages Router) that returns a `200 OK` status.
|
|
37
|
+
|
|
38
|
+
When running `deploy-stack`, choose **Advanced Configuration** and set your ALB Health Check Path to this route (e.g., `/api/health`).
|
|
39
|
+
|
|
40
|
+
### 3. Deploy
|
|
41
|
+
Your Next.js app is now perfectly optimized for AWS ECS Fargate!
|
|
42
|
+
|
|
43
|
+
Run `npx deploy-stack apply`. The CLI's generated `Dockerfile` will automatically target your new `.next/standalone` directory and deploy the optimized build to the cloud.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Migrating SvelteKit from Vercel to AWS Fargate
|
|
2
|
+
|
|
3
|
+
If you are seeing a warning from `deploy-stack` about your SvelteKit adapter, your project is currently using `@sveltejs/adapter-auto` (which often defaults to Vercel) or the explicit `@sveltejs/adapter-vercel`.
|
|
4
|
+
|
|
5
|
+
These adapters are designed specifically for proprietary serverless edge networks. To run your SvelteKit app in a scalable, standard Docker container on AWS Fargate, you need to switch to Svelte's official Node adapter.
|
|
6
|
+
|
|
7
|
+
## How to Fix
|
|
8
|
+
|
|
9
|
+
### 1. Install the Node Adapter
|
|
10
|
+
Run the following command in your terminal to install the Node adapter and remove the Vercel/Auto adapter:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -D @sveltejs/adapter-node
|
|
14
|
+
npm uninstall @sveltejs/adapter-auto @sveltejs/adapter-vercel
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 2. Update `svelte.config.js`
|
|
18
|
+
Open your `svelte.config.js` file and change the adapter import at the top of the file.
|
|
19
|
+
|
|
20
|
+
**Before (Locked into Vercel/Auto):**
|
|
21
|
+
```javascript
|
|
22
|
+
import adapter from '@sveltejs/adapter-auto'; // or '@sveltejs/adapter-vercel'
|
|
23
|
+
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
24
|
+
|
|
25
|
+
/** @type {import('@sveltejs/kit').Config} */
|
|
26
|
+
const config = {
|
|
27
|
+
preprocess: vitePreprocess(),
|
|
28
|
+
kit: {
|
|
29
|
+
adapter: adapter()
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default config;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**After (AWS Ready):**
|
|
37
|
+
```javascript
|
|
38
|
+
import adapter from '@sveltejs/adapter-node';
|
|
39
|
+
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
40
|
+
|
|
41
|
+
/** @type {import('@sveltejs/kit').Config} */
|
|
42
|
+
const config = {
|
|
43
|
+
preprocess: vitePreprocess(),
|
|
44
|
+
kit: {
|
|
45
|
+
adapter: adapter()
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default config;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 3. Deploy
|
|
53
|
+
Your SvelteKit app is now decoupled!
|
|
54
|
+
|
|
55
|
+
Run `npx deploy-stack apply`. The CLI will automatically detect the standard Node build output, package it into a hardened Docker container, and deploy it to your AWS cluster.
|
package/package.json
CHANGED
package/release_notes.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# π Architecture Overview & Vercel Example
|
|
2
|
+
|
|
3
|
+
This patch release improves the documentation generated for end-users and adds the Vercel migration reference implementation to our ecosystem.
|
|
4
|
+
|
|
5
|
+
### π What's New
|
|
6
|
+
* **Template Architecture Overview:** The auto-generated `README.md` placed in user repositories now includes a high-level "Architecture Overview". This ensures developers understand the AWS topology (ECS Fargate, ALB, IAM OIDC, S3 State) they just provisioned before diving into deployment commands.
|
|
7
|
+
* **Vercel Example Linked:** Officially linked the `deploy-stack-vercel-nextjs-example` repository in the main project README, providing users a direct reference for migrating edge routing (`vercel.json`) and Next.js standalone configurations to AWS.
|
package/src/commands/init.js
CHANGED
|
@@ -57,22 +57,23 @@ export async function mainStack({ isHeadless = false, headlessOptions = {} } = {
|
|
|
57
57
|
const disableDefaultCI = await handleRailsCI(dirConfig.targetDir, config.framework, isHeadless);
|
|
58
58
|
|
|
59
59
|
// 4. Framework Migration Checks (Vercel Escape Hatch)
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
60
|
+
if (config.framework === 'nextjs') {
|
|
61
|
+
const nextConfig = analyzeNextConfig(dirConfig.targetDir);
|
|
62
|
+
if (nextConfig.hasConfig && !nextConfig.isStandalone) {
|
|
63
|
+
log.warn(color.yellow('β οΈ Next.js config is missing "output: \'standalone\'".'));
|
|
64
|
+
console.log(color.cyan(' Fix it here: https://github.com/anton-codes-iac/deploy-stack/blob/main/docs/migrations/nextjs-vercel-to-aws.md'));
|
|
65
|
+
}
|
|
66
|
+
} else if (detectedFramework?.name === 'SvelteKit') {
|
|
67
|
+
const svelteConfig = analyzeSvelteConfig(dirConfig.targetDir);
|
|
68
|
+
if (svelteConfig.adapter === 'vercel' || svelteConfig.adapter === 'auto') {
|
|
69
|
+
log.warn(color.yellow('β οΈ SvelteKit is locked into the Vercel/Auto adapter.'));
|
|
70
|
+
console.log(color.cyan(' Fix it here: https://github.com/anton-codes-iac/deploy-stack/blob/main/docs/migrations/sveltekit-vercel-to-aws.md'));
|
|
71
|
+
}
|
|
72
|
+
} else if (detectedFramework?.name === 'Astro') {
|
|
73
|
+
const astroConfig = analyzeAstroConfig(dirConfig.targetDir);
|
|
74
|
+
if (astroConfig.adapter === 'vercel') {
|
|
75
|
+
log.warn(color.yellow('β οΈ Astro is locked into the Vercel adapter.'));
|
|
76
|
+
console.log(color.cyan(' Fix it here: https://github.com/anton-codes-iac/deploy-stack/blob/main/docs/migrations/astro-vercel-to-aws.md'));
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
|
|
@@ -167,6 +168,13 @@ export async function mainStack({ isHeadless = false, headlessOptions = {} } = {
|
|
|
167
168
|
? `git add . && git commit -m "chore: add AWS infrastructure and CI/CD" && git push`
|
|
168
169
|
: `git init && git add . && git commit -m "chore: add AWS infrastructure and CI/CD" && git branch -M ${config.branch} && git remote add origin https://github.com/your-username/your-repo.git && git push -u origin ${config.branch}`;
|
|
169
170
|
|
|
171
|
+
let docsTip = '';
|
|
172
|
+
if (procfile) {
|
|
173
|
+
docsTip = `\n ${color.blue('π Read the Heroku Migration Guide:')} ${color.underline('https://github.com/anton-codes-iac/deploy-stack/blob/main/docs/migrations/heroku-procfile-to-aws.md')}`;
|
|
174
|
+
} else if (config.needsDatabase) {
|
|
175
|
+
docsTip = `\n ${color.blue('π Read the Database Connections Guide:')} ${color.underline('https://github.com/anton-codes-iac/deploy-stack/blob/main/docs/guides/database-connections.md')}`;
|
|
176
|
+
}
|
|
177
|
+
|
|
170
178
|
outro(`${color.green('β
Templates generated!')} ${color.blue('π‘οΈ DevSecOps scanning enabled.')}
|
|
171
179
|
${frameworkWarnings ? `\n ${frameworkWarnings}` : ''}
|
|
172
180
|
${color.yellow('Next steps:')}
|
package/src/commands/secrets.js
CHANGED
|
@@ -42,6 +42,7 @@ export async function pushSecrets(envFilePath, projectName) {
|
|
|
42
42
|
s.stop(`β
Successfully pushed ${Object.keys(parsedSecrets).length} secrets to AWS!`);
|
|
43
43
|
console.log(color.cyan(`\nUpdated ${keysFilePath}`));
|
|
44
44
|
console.log(color.green('Commit this file and push to GitHub to trigger a deployment with your new variables.'));
|
|
45
|
+
console.log(color.blue(`\nπ Learn how secrets reach your app: ${color.underline('https://github.com/anton-codes-iac/deploy-stack/blob/main/docs/guides/secrets-management.md')}`));
|
|
45
46
|
|
|
46
47
|
trackEvent('secrets_pushed', {
|
|
47
48
|
projectName,
|
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,14 +0,0 @@
|
|
|
1
|
-
# π Vercel Escape Hatch, Orchestrator Refactor & Advanced Telemetry
|
|
2
|
-
|
|
3
|
-
This release introduces the second half of our PaaS Migration Engine, focusing on seamlessly escaping Vercel's proprietary edge network, alongside an internal architectural cleanup.
|
|
4
|
-
|
|
5
|
-
### β¨ What's New
|
|
6
|
-
* **Vercel Edge Routing Migration:** `deploy-stack` now automatically parses `vercel.json` files. It natively translates Vercel edge redirects (301/302) and regex path matching directly into standard AWS Application Load Balancer Listener Rules.
|
|
7
|
-
* **Vendor Lock-In Detection:** The CLI now proactively analyzes framework configuration files (`next.config.mjs`, `svelte.config.js`, `astro.config.mjs`) during the pre-flight checks. It warns users if they are locked into Vercel-specific adapters and provides exact instructions on how to switch to standard Node/Standalone outputs for AWS containerization.
|
|
8
|
-
|
|
9
|
-
### π οΈ Architecture & Telemetry
|
|
10
|
-
* **Core Orchestrator Refactor:** Stripped over 250 lines of business logic and UI prompting out of `init.js`, establishing a clean, strictly isolated `src/utils/` toolbox pattern for future PaaS parsers.
|
|
11
|
-
* **Wide Telemetry Payloads:** Upgraded the analytics engine to capture detailed execution context (CLI version, headless status, desired task counts, and specific migration vectors like Heroku/Vercel) to better map the user deployment funnel.
|
|
12
|
-
|
|
13
|
-
### π Bug Fixes
|
|
14
|
-
* **Next.js Standalone Enforcement:** Explicit warnings are now surfaced if a Next.js project is missing the critical `output: 'standalone'` directive before attempting to provision cloud resources.
|