Files

1.2 KiB

Shop Setup Guide (Production)

This guide is for a fresh machine at the shop.

1. Prerequisites

  • Docker Desktop installed and running
  • Node.js 20+ and npm
  • Git

2. Pull and prepare

git clone https://github.com/Krikorios/OMT-SM.git
cd OMT-SM

npm install
npm --prefix server install

3. Configure environment

Create root env for Docker DB + seeded owner:

cp .env.example .env

Edit .env and set strong values for POSTGRES_PASSWORD and ADMIN_PASSWORD.

Create API env:

cp server/.env.example server/.env

Edit server/.env:

  • Set DATABASE_URL password to match root .env POSTGRES_PASSWORD
  • Set a strong JWT_SECRET (32+ chars)
  • Keep NODE_ENV=production

4. Start in production mode

./scripts/start_prod.sh

The app is then reachable on:

5. Optional operations

Reset DB and rerun all migrations + seed:

npm run db:reset

Run nightly backups (cron example is inside the script header):

./scripts/backup.sh

6. First login

Use the admin email/password from root .env:

  • ADMIN_EMAIL
  • ADMIN_PASSWORD

Then create cashier/manager users from the UI.