Skip to content

Commit

Permalink
Make script backward compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
elainefigma committed Nov 1, 2023
1 parent 2dab066 commit d06d100
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

set -e

export DATABASE_URL=postgresql://${PG_INTEGRATIONS_JIRA_USER}:${PG_INTEGRATIONS_JIRA_PASSWORD}@${PG_INTEGRATIONS_HOST}:${PG_INTEGRATIONS_PORT}/${PG_INTEGRATIONS_DATABASE}
if [ -n "$PG_FIGMA_FOR_JIRA_DB_ROLE" ]; then
DATABASE_URL=postgresql://${PG_FIGMA_FOR_JIRA_DB_ROLE}:${PG_FIGMA_FOR_JIRA_DB_PASSWORD}@${PG_FIGMA_FOR_JIRA_DB_HOST}:${PG_FIGMA_FOR_JIRA_DB_PORT}/${PG_FIGMA_FOR_JIRA_DB_SCHEMA}
else
DATABASE_URL=postgresql://${PG_INTEGRATIONS_JIRA_USER}:${PG_INTEGRATIONS_JIRA_PASSWORD}@${PG_INTEGRATIONS_HOST}:${PG_INTEGRATIONS_PORT}/${PG_INTEGRATIONS_DATABASE}
fi

export DATABASE_URL

npx prisma migrate deploy
npx prisma generate
node server.js

0 comments on commit d06d100

Please sign in to comment.