The official deploy-stack integration for Nuxt.
nuxt-deploy-stack acts as an invisible bridge between your Nuxt project and AWS. It hooks directly into the Nitro server engine and features a "Magic Auto-Provisioner" that scaffolds a production-ready AWS architecture directly during your build process.
What it generates under the hood:
- Compute & Networking: An AWS ECS Fargate cluster, Application Load Balancer, and CloudFront CDN.
- DevSecOps CI/CD: A GitHub Actions workflow utilizing keyless IAM OIDC and automated Trivy container vulnerability scanning.
- State Management: Native Terraform templates with an encrypted S3 remote state backend utilizing modern native concurrency locking.
For a full breakdown of the architecture, detailed features, and release notes, please visit the main deploy-stack repository.
Currently, the auto-provisioner runs in a strict zero-config mode. When it detects a missing infrastructure setup, it automatically defaults to a highly-optimized Nuxt SSR deployment.
If you want to customize the generated infrastructure (e.g., changing the AWS region, modifying the compute tier, or injecting secrets), you can bypass the auto-provisioner by running the core CLI manually before you build:
# Run interactively to configure your exact setup
npx deploy-stackThe easiest way to install this module is using the Nuxt CLI. Run this in your project root:
npx nuxi@latest module add nuxt-deploy-stackIf you prefer to install manually:
- Install the package:
npm install nuxt-deploy-stack -D
- Add the integration to your
nuxt.config.ts:export default defineNuxtConfig({ modules: ['nuxt-deploy-stack'] });
This module works entirely in the background during your standard Nuxt production build (npm run build).
- Magic Auto-Provisioning: If no infrastructure exists in your project, it seamlessly invokes the
deploy-stackengine in headless mode. It automatically generates your Terraform templates, highly-optimized multi-stage Nitro Dockerfile, and GitHub Actions CI/CD pipeline directly in your repository. - Smart Nitro Optimization: It automatically configures your infrastructure to ensure the Nuxt Nitro server binds correctly to
0.0.0.0so container port mapping functions perfectly in AWS Fargate. - Contextual Syncing: If infrastructure is already generated, it politely reminds you to run
npx deploy-stack applyto sync your latest configuration and artifacts to the cloud.
Want to see it in action? Check out the deploy-stack-nuxt-example repository to see the fully generated architecture.
This module requires no manual configuration, but relies on the core deploy-stack engine. The auto-provisioner will safely fetch and execute the latest version of deploy-stack automatically during your build.
MIT