feat: add initial project configuration and smoke tests

- Created pnpm workspace configuration to manage packages.
- Added a placeholder .gitkeep file in the scripts directory.
- Implemented a smoke test script to validate core API and web endpoints.
- Established TypeScript base configuration for consistent compilation settings.
- Introduced Turbo configuration for task management and build processes.
This commit is contained in:
KinSun
2026-03-13 10:30:16 +08:00
commit 9d5616fdc6
68 changed files with 9851 additions and 0 deletions

35
entrypoint.sh Normal file
View File

@@ -0,0 +1,35 @@
#!/bin/sh
set -e
# Known limitation: Multi-process under a single shell entrypoint means if one
# process crashes, the container may remain partially alive. Production-grade
# process supervision is a future concern, not a scaffold blocker.
cleanup() {
echo "Shutting down..."
kill "$NGINX_PID" "$API_PID" "$WEB_PID" 2>/dev/null || true
wait "$NGINX_PID" "$API_PID" "$WEB_PID" 2>/dev/null || true
exit 0
}
trap cleanup SIGTERM SIGINT
# Start nginx
nginx -g 'daemon off;' &
NGINX_PID=$!
# Run Prisma migrations
cd /app/packages/api
npx prisma migrate deploy
# Start NestJS API
PORT=3001 node dist/main.js &
API_PID=$!
# Start Next.js standalone
cd /app/packages/web/standalone
PORT=3000 HOSTNAME=0.0.0.0 node packages/web/server.js &
WEB_PID=$!
# Wait for any process to exit
wait -n "$NGINX_PID" "$API_PID" "$WEB_PID"