Initial commit: MOPC platform with Docker deployment setup

Full Next.js 15 platform with tRPC, Prisma, PostgreSQL, NextAuth.
Includes production Dockerfile (multi-stage, port 7600), docker-compose
with registry-based image pull, Gitea Actions CI workflow, nginx config
for portal.monaco-opc.com, deployment scripts, and DEPLOYMENT.md guide.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 13:41:32 +01:00
commit a606292aaa
290 changed files with 70691 additions and 0 deletions

52
scripts/seed.sh Normal file
View File

@@ -0,0 +1,52 @@
#!/bin/bash
# =============================================================================
# MOPC Platform - One-Time Database Seed
# =============================================================================
# Usage: ./scripts/seed.sh
# Run this ONCE after the first deployment to populate the database with:
# - Super admin user
# - System settings
# - Program & Round 1 configuration
# - Evaluation form
# - Candidature data from CSV
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
DOCKER_DIR="$PROJECT_DIR/docker"
echo "============================================"
echo " MOPC Platform - Database Seed"
echo "============================================"
echo ""
echo "This will seed the database with:"
echo " - Admin user & system settings"
echo " - Program, Round 1, evaluation form"
echo " - Candidature data from CSV"
echo ""
read -p "Continue? (y/N) " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 0
fi
echo ""
echo "==> Running base seed (admin, settings, program, round, eval form)..."
cd "$DOCKER_DIR"
docker compose exec app npx tsx prisma/seed.ts
echo ""
echo "==> Running candidatures import from CSV..."
docker compose exec app npx tsx prisma/seed-candidatures.ts
echo ""
echo "============================================"
echo " Seed complete!"
echo "============================================"
echo ""
echo " Admin login: matt.ciaccio@gmail.com"
echo " (Use magic link authentication)"
echo ""