Skip to content

paladyne-io/nuxt3-flyio-template

Repository files navigation

Nuxt3 Fly.io Template

This is a minimal Nuxt3 template that successfully builds and can be deployed to Fly.io. It's designed to be a starting point for new projects that need to be deployed to Fly.io.

Features

  • Minimal Nuxt3 setup with Node 20
  • Optimized Dockerfile for Fly.io deployment
  • GitHub Actions workflow for building (with optional deployment)
  • Fly.io configuration

Getting Started

Prerequisites

  • Node.js 20+
  • npm
  • Git
  • GitHub CLI (for automated setup)
  • Fly.io account and CLI installed (optional for deployment)

Automated Setup

This template includes scripts to automate the setup process:

Test Locally

Test the template locally without creating a GitHub repository:

./test-local.sh

Test with GitHub Actions

Create a new GitHub repository and test the template with GitHub Actions:

./test-github-actions.sh

Test with Existing Repository

Test the template using an existing GitHub repository:

./test-existing-repo.sh

Create a New Project

Create a new project from this template and set it up on GitHub:

./create-github-project.sh

Manual Setup

Local Development

  1. Clone this template
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev

Deployment (Optional)

Manual Deployment

  1. Build the application:
    npm run build
  2. Deploy to Fly.io:
    fly deploy

GitHub Actions Deployment

  1. Uncomment the Fly.io deployment steps in .github/workflows/deploy.yml
  2. Add your Fly.io API token as a secret in your GitHub repository
  3. Push your changes to the main branch
  4. GitHub Actions will build and deploy to Fly.io

Configuration

  • fly.toml: Configure your Fly.io application settings
  • Dockerfile: Configure the Docker build process
  • .github/workflows/deploy.yml: Configure the GitHub Actions workflow

Troubleshooting

Common Issues

  • Missing package-lock.json: Make sure to commit your package-lock.json file to the repository
  • Nuxt build fails: Check your Nuxt configuration and dependencies
  • Fly.io deployment fails: Check your Fly.io configuration and credentials

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published