source:
docker-entrypoint.sh@
4f2900a
| Last change on this file since 4f2900a was 9137793, checked in by , 7 months ago | |
|---|---|
|
|
| File size: 345 bytes | |
| Rev | Line | |
|---|---|---|
| [05361b8] | 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 | ||
| [9137793] | 10 | echo "Checking if database is initialized..." |
| [05361b8] | 11 | |
| [9137793] | 12 | npm run drizzle:migrate |
| [05361b8] | 13 | |
| [9137793] | 14 | echo "Checking if database needs seeding..." |
| 15 | npm run drizzle:seed | |
| [05361b8] | 16 | |
| 17 | echo "Starting application..." | |
| [9137793] | 18 | exec node dist/server/index.mjs |
Note:
See TracBrowser
for help on using the repository browser.
