Add DATABASE_URL to build, simplify start script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
873602650e
commit
3fc061ff1b
@ -10,6 +10,7 @@ FROM node:14 as builder
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV BASE_URL=https://calendso.example.com
|
ENV BASE_URL=https://calendso.example.com
|
||||||
ENV NEXT_PUBLIC_APP_URL=https://calendso.example.com
|
ENV NEXT_PUBLIC_APP_URL=https://calendso.example.com
|
||||||
|
ENV DATABASE_URL=postgresql://POSTGRESQL
|
||||||
|
|
||||||
COPY calendso .
|
COPY calendso .
|
||||||
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Set environment variables
|
/app/scripts/wait-for-it.sh ${POSTGRES_HOST} -- echo "database is up"
|
||||||
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"
|
|
||||||
npx prisma migrate deploy
|
npx prisma migrate deploy
|
||||||
yarn start
|
yarn start
|
||||||
|
Loading…
Reference in New Issue
Block a user