Prepare shop-ready deployment docs and fix transaction modal UI

This commit is contained in:
Krikorios
2026-05-20 19:47:55 +03:00
parent 1896cbdd11
commit 1f23102050
16 changed files with 584 additions and 60 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Start the full production stack on this box.
set -euo pipefail
cd "$(dirname "$0")/.."
# 1. DB up (idempotent)
docker compose up -d db
# 2. Wait for DB to be healthy
for i in $(seq 1 30); do
if docker exec crm_omt_db pg_isready -U postgres -d crm_omt >/dev/null 2>&1; then
break
fi
sleep 1
done
# 3. Build frontend (no-op if dist/ already current; safe to re-run)
if [ ! -d dist ] || [ -n "$(find src -newer dist -type f -print -quit 2>/dev/null)" ]; then
echo "[prod] building frontend..."
npm run build
fi
# 4. Start API in production mode (foreground; use a process manager for restart)
cd server
node src/index.js