source:
docker-entrypoint.sh@
05361b8
| Last change on this file since 05361b8 was 05361b8, checked in by , 7 months ago | |
|---|---|
|
|
| File size: 367 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 "Generating migrations..." |
| 11 | npm run drizzle:generate |
| 12 | |
| 13 | echo "Running migrations..." |
| 14 | npm run drizzle:migrate |
| 15 | |
| 16 | echo "Seeding database..." |
| 17 | npm run drizzle:seed |
| 18 | |
| 19 | echo "Starting application..." |
| 20 | exec node dist/server/index.mjs |
Note:
See TracBrowser
for help on using the repository browser.
