yslootahrobotics/docker-entrypoint.sh
Najjar\NajjarV02 729ab71c2c
Some checks are pending
CI/CD / test-and-build (push) Waiting to run
CI/CD / deploy (push) Blocked by required conditions
Refactor code structure for improved readability and maintainability; removed redundant code blocks and optimized function calls.
2026-05-20 18:03:42 +04:00

17 lines
524 B
Bash

#!/bin/sh
set -e
# Ensure the persistent database directory exists
# (Coolify: mount a volume at /app/prisma so data survives redeployments)
mkdir -p /app/prisma
echo "→ Syncing database schema..."
# db push creates the SQLite file and syncs tables to match schema.prisma
/app/node_modules/.bin/prisma db push
echo "→ Seeding database (idempotent pricing rows are upserted every deploy)..."
/app/node_modules/.bin/tsx /app/prisma/seed.ts
echo "→ Starting Next.js on port ${PORT:-3000}..."
exec node /app/server.js