#!/usr/bin/env bash # WorthDoing.ai # Author: Simon-Pierre Boucher # Contact: contact@spboucher.ai # File: deploy/start.sh # Description: Production start script for node m3u96a — build, migrate, launch on port 3001 (PM2-friendly). set -euo pipefail cd "$(dirname "$0")/.." if [ ! -f .env ]; then echo "Missing .env — copy .env.example and fill in secrets." >&2 exit 1 fi set -a # shellcheck disable=SC1091 source .env set +a corepack enable >/dev/null 2>&1 || true pnpm install --frozen-lockfile pnpm drizzle-kit migrate pnpm build exec pnpm start