This monorepo contains the Nuxfly CLI and Nuxt module for deploying Nuxt applications to Fly.io.
Warning
This project is in early development and may not be fully functional yet.
# Install CLI globally
npm install -g @nuxfly/cli
# In your Nuxt project, install the module
npm install @nuxfly/core
# Add to nuxt.config.ts and set config flags
export default defineNuxtConfig({
modules: ['@nuxfly/core'],
nuxfly: {
litestream: true, // Enable SQLite with Litestream backup
publicStorage: true, // Enable public S3 storage
privateStorage: true, // Enable private S3 storage
}
})
# Launch your app
nuxfly launchNuxfly supports deploying to multiple environments (staging, development, etc.) using the NUXFLY_ENV environment variable:
# Production (default) - creates fly.toml
nuxfly launch --name my-app
# Staging environment - creates fly.staging.toml
export NUXFLY_ENV=staging
nuxfly launch --name my-app-staging
# Development environment - creates fly.development.toml
export NUXFLY_ENV=development
nuxfly launch --name my-app-dev
# Deploy to specific environments
NUXFLY_ENV=staging nuxfly deploy
NUXFLY_ENV=development nuxfly deployFile naming convention:
fly.toml- Production (default)fly.staging.toml- Staging environmentfly.development.toml- Development environment
When is NUXFLY_ENV required?
- Single environment (only
fly.toml): Optional - Multi-environment (multiple
fly.*.tomlfiles): Required
📖 Read the full documentation for detailed setup and usage instructions.
CLI tool for deploying Nuxt applications to Fly.io with integrated storage and database support.
Nuxt module that provides runtime composables for Fly.io integration including SQLite database, public/private storage, and proxy functionality.
pnpm installpnpm build# Build CLI
cd packages/cli && pnpm build
# Build Core Module
cd packages/core && pnpm buildThe playground directory contains a test Nuxt application for development:
# Test production deployment
cd playground
nuxfly launch
# Test staging deployment
cd playground
NUXFLY_ENV=staging nuxfly launch --name playground-stagingBoth packages have been released to GitHub with the following tags:
- @nuxfly/core:
core-v1.0.0 - @nuxfly/cli:
cli-v1.0.0
To create new releases:
- Build packages:
pnpm build - Create tags:
git tag core-v1.0.1 -m "@nuxfly/core v1.0.1" git tag cli-v1.0.1 -m "@nuxfly/cli v1.0.1"
- Push tags:
git push origin core-v1.0.1 cli-v1.0.1
If you want to publish to npm:
cd packages/core
pnpm build
npm publishcd packages/cli
pnpm build
npm publishThe project includes release-it configurations for automated releases, but they're currently set to skip npm publishing. You can modify the .release-it.json files to enable npm publishing when ready.
nuxfly/
├── packages/
│ ├── cli/ # @nuxfly/cli - CLI tool
│ │ ├── src/
│ │ │ ├── index.mjs # CLI entry point
│ │ │ ├── commands/ # CLI commands
│ │ │ ├── templates/ # Template files
│ │ │ └── utils/ # CLI utilities
│ │ └── dist/ # Built CLI
│ │
│ └── core/ # @nuxfly/core - Nuxt module
│ ├── src/
│ │ ├── module.ts # Nuxt module entry
│ │ └── runtime/ # Runtime composables
│ └── dist/ # Built module
│
├── playground/ # Testing environment
├── package.json # Root workspace config
└── pnpm-workspace.yaml # PNPM workspace config