diff --git a/docker-compose.yaml b/docker-compose.yaml index 9cb634f74..d3a5bdcfd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -36,8 +36,12 @@ services: env_file: .env environment: - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB} + - NODE_ENV=development depends_on: - database + volumes: + - "./calendso:/app/" + - "./scripts:/app/scripts" # Optional use of Prisma Studio. In production, comment out or remove the section below to prevent unwanted access to your database. studio: diff --git a/scripts/start.sh b/scripts/start.sh index dc8468417..17cf4c04b 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,6 +1,14 @@ -#!/bin/sh +#!/bin/bash set -x +# # Set environment variables +# echo NEXT_PUBLIC_APP_URL $NEXT_PUBLIC_APP_URL +# find \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#$NEXT_PUBLIC_APP_URL#$NEXT_PUBLIC_APP_URL_SUBSTITUTE#g" + /app/scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up" npx prisma migrate deploy -yarn start +if [[ $NODE_ENV == "development" ]]; then + yarn dev +else + yarn start +fi \ No newline at end of file