From 5a86b171ec2335f1fba497acdb5fd07b58c8a3cc Mon Sep 17 00:00:00 2001 From: Tera Date: Sun, 29 Sep 2024 12:32:08 +0000 Subject: [PATCH] fix: Fixes Kubernetes support. --- api/docker-entrypoint.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/docker-entrypoint.sh b/api/docker-entrypoint.sh index 6339c78..b76e0e1 100644 --- a/api/docker-entrypoint.sh +++ b/api/docker-entrypoint.sh @@ -1,9 +1,12 @@ #!/bin/bash export NODE_ENV="production" -export DATABASE_URL="postgresql://$POSTGRES_USERNAME:$POSTGRES_PASSWORD@nextnet-postgres:5432/$POSTGRES_DB?schema=nextnet" + +if [[ "$DATABASE_URL" == "" ]]; then + export DATABASE_URL="postgresql://$POSTGRES_USERNAME:$POSTGRES_PASSWORD@nextnet-postgres:5432/$POSTGRES_DB?schema=nextnet" +fi echo "Welcome to NextNet." echo "Running database migrations..." npx prisma migrate deploy echo "Starting application..." -npm start \ No newline at end of file +npm start