mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-19 02:51:47 +08:00
1719a3b582
Adds one-click deploy to [Render](https://render.com) for self-hosters. The change is additive: a root `render.yaml`, two small files under `.render/`, and one button in the existing Self-Host section of the README.
13 lines
393 B
Bash
Executable File
13 lines
393 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
# Use the hostname Render assigns, unless AFFINE_SERVER_HOST is already set to a
|
|
# custom domain.
|
|
export AFFINE_SERVER_HOST="${AFFINE_SERVER_HOST:-${RENDER_EXTERNAL_HOSTNAME:-localhost}}"
|
|
|
|
# Generates the server private key on first boot, then runs the Prisma and data
|
|
# migrations. Safe to run on every boot.
|
|
node ./scripts/self-host-predeploy.js
|
|
|
|
exec node ./dist/main.js
|