Add DATABASE_URL to build, simplify start script
continuous-integration/drone/push Build is passing Details

This commit is contained in:
3wc 2022-01-05 14:00:50 +02:00
parent 873602650e
commit 3fc061ff1b
2 changed files with 2 additions and 7 deletions

View File

@ -10,6 +10,7 @@ FROM node:14 as builder
WORKDIR /app
ENV BASE_URL=https://calendso.example.com
ENV NEXT_PUBLIC_APP_URL=https://calendso.example.com
ENV DATABASE_URL=postgresql://POSTGRESQL
COPY calendso .

View File

@ -1,12 +1,6 @@
#!/bin/sh
set -x
# Set environment variables
echo BASE_URL $BASE_URL
echo NEXT_PUBLIC_APP_URL "$NEXT_PUBLIC_APP_URL"
find \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#https://calendso.example.com#$NEXT_PUBLIC_APP_URL#g"
find \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#https://calendso.example.com#$BASE_URL#g"
/app/scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up"
/app/scripts/wait-for-it.sh ${POSTGRES_HOST} -- echo "database is up"
npx prisma migrate deploy
yarn start