Skip to content

Repository files navigation

nuxt-deploy-stack ☁️🚀

NPM Version License: MIT

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.


⚙️ Configuration & Flags

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-stack

📦 Installation

The easiest way to install this module is using the Nuxt CLI. Run this in your project root:

npx nuxi@latest module add nuxt-deploy-stack

Manual Installation

If you prefer to install manually:

  1. Install the package:
    npm install nuxt-deploy-stack -D
  2. Add the integration to your nuxt.config.ts:
    export default defineNuxtConfig({
      modules: ['nuxt-deploy-stack']
    });

🚀 Usage

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-stack engine 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.0 so container port mapping functions perfectly in AWS Fargate.
  • Contextual Syncing: If infrastructure is already generated, it politely reminds you to run npx deploy-stack apply to sync your latest configuration and artifacts to the cloud.

🎮 Live Example

Want to see it in action? Check out the deploy-stack-nuxt-example repository to see the fully generated architecture.

🔗 Prerequisites

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.

📜 License

MIT

About

Zero-config AWS Fargate & ECS deployment infrastructure generator for Nuxt 3.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages