Skip to content

Commit

Permalink
Create alwaysdata provider presets and deployment doc
Browse files Browse the repository at this point in the history
  • Loading branch information
m4dz authored and m4dz committed Oct 5, 2023
1 parent 2606a83 commit c608bbc
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/content/2.deploy/providers/alwaysdata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# alwaysdata

Deploy Nitro apps to alwaysdata.

**Preset:** `alwaysdata` ([switch to this preset](/deploy/#changing-the-deployment-preset))

Nitro supports deploying on the [alwaysdata](https://www.alwaysdata.com/en/) platform with minimal configuration.

## Set up application

### Pre-requisites

1. [Register a new profile](https://www.alwaysdata.com/en/register/) on alwaysdata platform if you don't have one.

2. Get a free 100Mb plan to host your app.

### Local deployment

1. Build your project locally with `NITRO_PRESET=alwaysdata yarn build`

2. [Upload your app](https://help.alwaysdata.com/en/remote-access/) to your account in its own directory (e.g. `$HOME/www/my-app`).

3. On your admin panel, [create a new site](https://admin.alwaysdata.com/site/add/) for your app with the following features:
- *Addresses*: `[account-name].alwaysdata.net`
- *Type*: Node.js
- *Command*: `node ./output/server/index.mjs`
- *Working directory*: `www/my-app` (adapt it to your deployment path)
- *Environment*:
```
NITRO_PRESET=alwaysdata
```
- *Node.js version*: pick at least `16.0.0` if needed, but `Default version` is fine.

[Get more information about alwaysdata Node.js sites type](https://help.alwaysdata.com/en/languages/nodejs/).

4. Your app is now live at `http(s)://[account-name].alwaysdata.net`.
5 changes: 5 additions & 0 deletions src/presets/alwaysdata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineNitroPreset } from "../preset";

export const digitalOcean = defineNitroPreset({
extends: "node-server",
});
1 change: 1 addition & 0 deletions src/presets/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./alwaysdata";
export * from "./aws-lambda";
export * from "./azure-functions";
export * from "./azure";
Expand Down

0 comments on commit c608bbc

Please sign in to comment.