Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

astro-deploy-stack ☁️🚀

NPM Version License: MIT

The official deploy-stack integration for Astro.

astro-deploy-stack acts as an invisible bridge between your Astro project and AWS. It automatically optimizes Astro's network configuration for containerized environments 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 static 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 integration is using the Astro CLI. Run this in your Astro project root:

npx astro add astro-deploy-stack

Manual Installation

If you prefer to install manually:

  1. Install the package:
    npm install astro-deploy-stack
  2. Add the integration to your astro.config.mjs:
    import { defineConfig } from 'astro/config';
    import deployStack from 'astro-deploy-stack';
    
    export default defineConfig({
      integrations: [deployStack()]
    });

🚀 Usage

This integration works entirely in the background during your standard Astro 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 Dockerfile, and GitHub Actions CI/CD pipeline directly in your repository.
  • Smart SSR Optimization: If you are using Astro in server or hybrid output modes, it automatically overrides the Astro server host to 0.0.0.0 to ensure Docker container port mapping functions correctly 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.

🔗 Prerequisites

This integration 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

Deploy-stack integration for Astro. Instantly generate zero-lock-in AWS ECS Fargate infrastructure and GitHub Actions CI/CD for your Astro site.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages