Skip to content

zauberware/capistrano-nextjs

Repository files navigation

Capistrano::Nextjs

Next.js integration for Capistrano with systemd support.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-nextjs'

And then execute:

bundle install

Usage

Add the following to your Capfile:

require 'capistrano/pnpm'
require 'capistrano/nextjs'
install_plugin Capistrano::NextjsPlugin
install_plugin Capistrano::NextjsSystemd

Add the following to your config/deploy.rb:

# Next.js configuration
set :nextjs_roles, :app
set :nextjs_env, fetch(:stage)

Available Tasks

  • cap nextjs:start - Start Next.js application
  • cap nextjs:stop - Stop Next.js application
  • cap nextjs:restart - Restart Next.js application
  • cap nextjs:status - Check Next.js application status
  • cap nextjs:install - Install systemd service
  • cap nextjs:uninstall - Uninstall systemd service
  • cap nextjs:build - Build Next.js application
  • cap nextjs:check - Check Next.js application (lint)

Configuration

The gem automatically integrates with your deployment process:

  • Stops the service before deployment
  • Starts the service after successful deployment
  • Restarts the service if deployment fails

Requirements

  • Node.js
  • pnpm
  • systemd (for service management)

License

The gem is available as open source under the terms of the LGPL-3.0 License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published