fix: check if POSTGRES_URL env variable is set before starting the migration script (if external db) (#139)

This commit is contained in:
Cyber
2025-08-14 20:58:26 +02:00
committed by GitHub
parent 8079345546
commit 80d1c5f805

View File

@@ -81,5 +81,4 @@ ARG PORT=3000
ENV PORT=${PORT}
EXPOSE ${PORT}
CMD ["sh", "-c", "cd /app && pnpm db:migrate && cd /app/apps/web && pnpm start"]
CMD ["sh", "-c", "if [ -n \"$POSTGRES_URL\" ]; then cd /app && pnpm db:migrate && cd /app/apps/web; fi && pnpm start"]