From 80d1c5f8059fb5facfcdf7ff67c9dcc3bbaf3d39 Mon Sep 17 00:00:00 2001 From: Cyber Date: Thu, 14 Aug 2025 20:58:26 +0200 Subject: [PATCH] fix: check if `POSTGRES_URL` env variable is set before starting the migration script (if external db) (#139) --- apps/web/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index bebb9bf2..dd4005b9 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -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"]