source: docker-entrypoint.sh@ 4ceb725

main
Last change on this file since 4ceb725 was 9137793, checked in by Tome <gjorgievtome@…>, 7 months ago

Fix migration and db seeding

  • Property mode set to 100644
File size: 345 bytes
RevLine 
[05361b8]1#!/bin/sh
2set -e
3
4echo "Waiting for PostgreSQL to be ready..."
5
6until pg_isready -h db -U app -d postgres > /dev/null 2>&1; do
7 sleep 2
8done
9
[9137793]10echo "Checking if database is initialized..."
[05361b8]11
[9137793]12npm run drizzle:migrate
[05361b8]13
[9137793]14echo "Checking if database needs seeding..."
15npm run drizzle:seed
[05361b8]16
17echo "Starting application..."
[9137793]18exec node dist/server/index.mjs
Note: See TracBrowser for help on using the repository browser.