Dough Git

clove/web

deploy/run

back to deploy

#!/bin/sh
exec 2>&1

cd /srv/clove/web || exit 1

export HOST=127.0.0.1
export PORT=3100
export NODE_ENV=production

# Public URL behind the proxy: SvelteKit needs it for form actions (CSRF check)
# and to build the SSO redirect URI
export ORIGIN=https://doughmination.gay

# Run as clove rather than root. chpst doesn't change HOME, so set it for Deno's cache
export HOME=/home/clove

# Secrets (SSO client, session secret, guestbook key) live in /srv/clove/web/.env,
# which Deno skips if it's missing. Reads are limited to this folder
exec chpst -u clove /usr/bin/deno run \
	--allow-net \
	--allow-env \
	--allow-read=. \
	--env-file=.env \
	deploy/server.ts