Providers
Platform.sh
将 Nitro 应用部署到 platform.sh
预设:platform_sh
¥Preset: platform_sh
设置
¥Setup
首先,在 platform.sh 上创建一个新项目,并将其链接到你想要自动部署的存储库。
¥First, create a new project on platform.sh and link it to the repository you want to auto-deploy with.
然后在存储库中创建 .platform.app.yaml
文件:
¥Then in repository create .platform.app.yaml
file:
.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