-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Alembic migration script and update Kubernetes deployment scripts
- Loading branch information
1 parent
7a76d89
commit 41671f6
Showing
3 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Wait for PostgreSQL to become available | ||
echo "Waiting for PostgreSQL to become available..." | ||
while ! pg_isready -h $DB_HOST -p $DB_PORT -U $DB_USER; do | ||
sleep 1 | ||
done | ||
|
||
echo "PostgreSQL is up - executing Alembic migrations" | ||
# Navigate to your project directory (where pyproject.toml is located) | ||
cd /app/app | ||
# Use poetry to run Alembic migrations | ||
poetry run alembic upgrade head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters