mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 05:59:39 +02:00
Add complete Docker deployment infrastructure for 4 new applications: - Dockerfiles for backend (NestJS) and web (SvelteKit) apps - docker-entrypoint.sh scripts with PostgreSQL wait and schema push - Updated docker-compose.staging.yml with 7 new services - Updated CI/CD workflows with build matrix and health checks
23 lines
527 B
Bash
23 lines
527 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
echo "=== Clock Backend Entrypoint ==="
|
|
|
|
# Wait for PostgreSQL to be ready
|
|
echo "Waiting for PostgreSQL..."
|
|
until pg_isready -h ${DB_HOST:-postgres} -p ${DB_PORT:-5432} -U ${DB_USER:-postgres} 2>/dev/null; do
|
|
echo "PostgreSQL is unavailable - sleeping"
|
|
sleep 2
|
|
done
|
|
echo "PostgreSQL is up!"
|
|
|
|
cd /app/apps/clock/apps/backend
|
|
|
|
# Run schema push
|
|
echo "Pushing database schema..."
|
|
npx drizzle-kit push --force
|
|
echo "Schema push completed!"
|
|
|
|
# Execute the main command
|
|
echo "Starting application..."
|
|
exec "$@"
|