main
|
Last change
on this file since 3a9c59c 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
|
|---|
| 2 | set -e
|
|---|
| 3 |
|
|---|
| 4 | echo "Waiting for PostgreSQL to be ready..."
|
|---|
| 5 |
|
|---|
| 6 | until pg_isready -h db -U app -d postgres > /dev/null 2>&1; do
|
|---|
| 7 | sleep 2
|
|---|
| 8 | done
|
|---|
| 9 |
|
|---|
| 10 | echo "Checking if database is initialized..."
|
|---|
| 11 |
|
|---|
| 12 | npm run drizzle:migrate
|
|---|
| 13 |
|
|---|
| 14 | echo "Checking if database needs seeding..."
|
|---|
| 15 | npm run drizzle:seed
|
|---|
| 16 |
|
|---|
| 17 | echo "Starting application..."
|
|---|
| 18 | exec node dist/server/index.mjs
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.