source: docker-entrypoint.sh@ ae5d054

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

Fix migration and db seeding

  • Property mode set to 100644
File size: 345 bytes
Line 
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
10echo "Checking if database is initialized..."
11
12npm run drizzle:migrate
13
14echo "Checking if database needs seeding..."
15npm run drizzle:seed
16
17echo "Starting application..."
18exec node dist/server/index.mjs
Note: See TracBrowser for help on using the repository browser.