Getting started

Home server and Plesk

Git deploy to davit.in staging and Plesk Node.js settings.

Deploy

Local

pnpm install
cp .env.example .env.local
pnpm dev

Staging host: davit.in

Live brand URLs and schema $id values stay on https://davit.ie. Staging is https://davit.in.

Plesk Node.js panel

Your current values need these changes:

Field Current Use this
Node.js version 22.23.2 Keep
Package manager npm npm is fine on Plesk
Application root /httpdocs Directory that contains package.json after Git checkout
Document root /httpdocs /httpdocs/public if Plesk insists; Node still serves the app
Application mode production production
Application URL http://davit.in https://davit.in if the certificate is on
Application startup file app.js (missing) app.js — now in the repo
Custom environment variables empty see below

app.js is a small Next server so Plesk has a real startup file. It is not Express.

Environment variables

NODE_ENV=production
SITE_URL=https://davit.in
SITE_NAME=DAVIT
AUTH_SECRET=<openssl rand -base64 48>
DB_CLIENT=mariadb
DATABASE_URL=mysql://USER:PASSWORD@127.0.0.1:3306/DATABASE
ADMIN_EMAIL=admin@davit.ie
ADMIN_PASSWORD=<strong password>
ADMIN_NAME=Davit

Create the MariaDB database in Plesk, apply db/maria_schema.sql, then run npm run db:init with the same URL so the admin user and package rows exist. PostgreSQL is db/pg_schema.sql later.

Git on Plesk

  1. Create a GitHub (or GitLab) repository and push this project from the home server:
cd davit-web
git init
git add .
git commit -m "DAVIT web staging"
git branch -M main
git remote add origin git@github.com:DavitTec/davit-web.git
git push -u origin main

Do not commit .env.local or .data/.

  1. In Plesk: domain davit.in → Git → Add repository.

    • Remote URL: git@github.com:DavitTec/davit-web.git (or HTTPS)
    • Deployment path: the Application Root (/httpdocs or a subfolder such as /httpdocs/davit-web)
    • Branch: main
  2. Additional deployment actions (run after each pull):

npm ci || npm install
npm run build
  1. Enable Enable additional deployment actions and save.
  2. Click Deploy / Pull now.
  3. Node.js panel → Restart App.

Later updates are: commit on the home server → git push → Plesk Pull (or enable auto-deploy).

First request checklist

  • https://davit.in/ — short CTA homepage
  • https://davit.in/docs
  • https://davit.in/schemas/mx/file-types.json — raw JSON
  • https://davit.in/docs/private/runbook — must redirect to /login

Schema $id fields still say https://davit.ie/schemas/mx/.... That is the canonical name. Staging serves the same bytes at https://davit.in/schemas/mx/....