Merge pull request #21 from krumIO/startup-env
Remove hardcoded database url and add DATABASE_HOST variable
This commit is contained in:
commit
9d8802b195
3
.env
3
.env
@ -1,7 +1,8 @@
|
|||||||
POSTGRES_USER=unicorn_user
|
POSTGRES_USER=unicorn_user
|
||||||
POSTGRES_PASSWORD=magical_password
|
POSTGRES_PASSWORD=magical_password
|
||||||
POSTGRES_DB=calendso
|
POSTGRES_DB=calendso
|
||||||
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}"
|
DATABASE_HOST=db:5432
|
||||||
|
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}"
|
||||||
GOOGLE_API_CREDENTIALS='secret'
|
GOOGLE_API_CREDENTIALS='secret'
|
||||||
BASE_URL='http://localhost:3000'
|
BASE_URL='http://localhost:3000'
|
||||||
NEXTAUTH_URL='http://localhost:3000'
|
NEXTAUTH_URL='http://localhost:3000'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
/app/scripts/wait-for-it.sh db:5432 -- echo "db is up"
|
/app/scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "db is up"
|
||||||
npx prisma db push
|
npx prisma db push
|
||||||
yarn start
|
yarn start
|
Loading…
Reference in New Issue
Block a user