-
Notifications
You must be signed in to change notification settings - Fork 263
docs: add deployhq as a node.js deployment provider #2267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
facundofarias
wants to merge
3
commits into
nuxt:main
Choose a base branch
from
facundofarias:add-deployhq
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+68
−0
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| title: DeployHQ | ||
| description: 'Deploy your Nuxt application to your own server with DeployHQ build pipelines.' | ||
| logoSrc: '/assets/integrations/deployhq.svg' | ||
| category: Hosting | ||
| nitroPreset: 'node-server' | ||
| website: 'https://www.deployhq.com/' | ||
| --- | ||
|
|
||
| [DeployHQ](https://www.deployhq.com/) is a Git-based deployment automation platform. It connects to your GitHub, GitLab, or Bitbucket repository, runs your Nuxt build on its build pipeline servers, and transfers the resulting `.output/` directory to a server you provision yourself over SSH/SFTP/FTP — or to S3, Azure Blob Storage, or Rackspace Cloud Files. | ||
|
|
||
| ::tip | ||
| DeployHQ builds and delivers your application; it does not host the running Node.js process. You deploy the artifact to a server (VPS, dedicated box, or cloud instance) where Node runs the Nitro `node-server` output. | ||
| :: | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. Sign up at [deployhq.com/signup](https://www.deployhq.com/signup) and create a new project, connecting it to your Nuxt repository. | ||
|
|
||
| 2. Add a deployment server (SSH/SFTP recommended) and point it at the directory on your host where the built application should land — for example `/var/www/my-nuxt-app/releases`. | ||
|
|
||
| 3. Configure the **build pipeline** to install dependencies and produce the Nitro output. In your project's **Build Pipeline** settings, add the following commands: | ||
|
|
||
| ```bash [Build pipeline] | ||
| npm install | ||
| npm run build | ||
| ``` | ||
|
|
||
| DeployHQ will execute these on its build servers and ship the resulting `.output/` directory to your server. | ||
|
|
||
| 4. Ensure your `package.json` declares a Node version compatible with Nitro and exposes a start script: | ||
|
|
||
| ```json [package.json] | ||
| { | ||
| "engines": { | ||
| "node": ">=20.19" | ||
| }, | ||
| "scripts": { | ||
| "build": "nuxt build", | ||
| "start": "node .output/server/index.mjs" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| 5. On your server, run the application as a long-running process (using `pm2`, `systemd`, or your process manager of choice): | ||
|
|
||
| ```bash [Terminal] | ||
| node .output/server/index.mjs | ||
| ``` | ||
|
|
||
| 6. Optionally use **deploy hooks** (pre/post deployment commands) to restart your process manager after each release, for example `pm2 reload my-nuxt-app` as a post-deploy SSH command. | ||
|
|
||
| For static deployments, replace step 3 with `npm run generate` and configure your server to serve the contents of `.output/public/` from a web server such as Nginx or Caddy. | ||
|
|
||
| ::tip | ||
| DeployHQ supports multiple environments per project — map your `main` branch to production and a `staging` branch to a separate staging server. Encrypted config files (e.g. `.env`) can be injected at deploy time per environment, and atomic releases with a symlinked `current` directory enable one-click rollback to any previous deployment. | ||
| :: | ||
|
|
||
| ## Learn more | ||
|
|
||
| ::read-more{to="https://www.deployhq.com/support" target="_blank"} | ||
| Read the **DeployHQ support docs** for full coverage of build pipelines, environments, and deploy hooks. | ||
| :: | ||
|
|
||
| ::read-more{to="https://nitro.build/deploy/runtimes/node" target="_blank"} | ||
| Head over to **Nitro documentation** to learn more about the `node-server` preset. | ||
| :: | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.