Make use of internal docker networks unifi database name
This commit is contained in:
parent
50f472c7e5
commit
6c7ebb345a
@ -1,4 +1,4 @@
|
|||||||
# Set this value to 'agree' to accept our license:
|
# Set this value to 'agree' to accept our license:
|
||||||
# LICENSE: https://github.com/calendso/calendso/blob/main/LICENSE
|
# LICENSE: https://github.com/calendso/calendso/blob/main/LICENSE
|
||||||
#
|
#
|
||||||
# Summary of terms:
|
# Summary of terms:
|
||||||
@ -14,7 +14,7 @@ NEXT_PUBLIC_APP_URL=http://localhost:3000
|
|||||||
POSTGRES_USER=unicorn_user
|
POSTGRES_USER=unicorn_user
|
||||||
POSTGRES_PASSWORD=magical_password
|
POSTGRES_PASSWORD=magical_password
|
||||||
POSTGRES_DB=calendso
|
POSTGRES_DB=calendso
|
||||||
DATABASE_HOST=db:5432
|
DATABASE_HOST=database:5432
|
||||||
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
||||||
GOOGLE_API_CREDENTIALS={}
|
GOOGLE_API_CREDENTIALS={}
|
||||||
|
|
||||||
|
@ -1,14 +1,23 @@
|
|||||||
# Use postgres/example user/password credentials
|
# Use postgres/example user/password credentials
|
||||||
version: '3.1'
|
version: '3.1'
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
database-data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
stack:
|
||||||
|
external: false
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
database:
|
||||||
image: postgres
|
image: postgres
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- database-data:/var/lib/postgresql/data/
|
- database-data:/var/lib/postgresql/data/
|
||||||
env_file: .env
|
env_file: .env
|
||||||
ports:
|
networks:
|
||||||
- 5432:5432
|
- stack
|
||||||
|
|
||||||
calendso:
|
calendso:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@ -18,28 +27,31 @@ services:
|
|||||||
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL}
|
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL}
|
||||||
image: calendso/docker
|
image: calendso/docker
|
||||||
restart: always
|
restart: always
|
||||||
|
networks:
|
||||||
|
- stack
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
env_file: .env
|
env_file: .env
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- database
|
||||||
|
|
||||||
# Optional use of Prisma Studio. In production, comment out or remove the section below to prevent unwanted access to your database.
|
# Optional use of Prisma Studio. In production, comment out or remove the section below to prevent unwanted access to your database.
|
||||||
studio:
|
studio:
|
||||||
image: calendso/docker
|
image: calendso/docker
|
||||||
restart: always
|
restart: always
|
||||||
|
networks:
|
||||||
|
- stack
|
||||||
ports:
|
ports:
|
||||||
- 5555:5555
|
- 5555:5555
|
||||||
env_file: .env
|
env_file: .env
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- database
|
||||||
command:
|
command:
|
||||||
- npx
|
- npx
|
||||||
- prisma
|
- prisma
|
||||||
- studio
|
- studio
|
||||||
# END SECTION: Optional use of Prisma Studio.
|
# END SECTION: Optional use of Prisma Studio.
|
||||||
volumes:
|
|
||||||
database-data:
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
/app/scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "db is up"
|
/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