Skip to content
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

docs(deploy): add platform.sh #1630

Merged
merged 6 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/2.deploy/20.providers/platform-sh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Platform.sh

> Deploy Nitro apps to platform.sh

**Preset:** `platform_sh`

:read-more{to="https://platform.sh"}

## Setup

First, create a new project on platform.sh and link it to the repository you want to auto-deploy with.

Then in repository create `.platform.app.yaml` file:

```yaml [.platform.app.yaml]
name: nitro-app
type: 'nodejs:18'
disk: 128
web:
commands:
start: "node .output/server/index.mjs"
build:
flavor: none
hooks:
build: |
corepack enable
npx nypm install
NITR_PRESET=platform_sh npm run build
mounts:
'.data':
source: local
source_path: .data
```

:read-more{title="Complete list of all available properties" to="https://docs.platform.sh/create-apps/app-reference.html"}

:read-more{title="Complete list of all available properties" to="https://unjs.io/blog/2023-08-25-nitro-2.6#default-persistent-data-storage"}
1 change: 1 addition & 0 deletions src/presets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export { nitroPrerender } from "./nitro-prerender";
export { cli } from "./node-cli";
export { nodeServer, nodeCluster } from "./node-server";
export { node } from "./node";
export { platformSh } from "./platform-sh";
export { renderCom } from "./render-com";
export { serviceWorker } from "./service-worker";
export { stormkit } from "./stormkit";
Expand Down
5 changes: 5 additions & 0 deletions src/presets/platform-sh.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineNitroPreset } from "../preset";

export const platformSh = defineNitroPreset({
extends: "node-server",
});