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