-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: Removed venv from the container
- Loading branch information
1 parent
d94eab6
commit 9201f2e
Showing
3 changed files
with
30 additions
and
21 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
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
#!/bin/sh | ||
|
||
echo "Waiting for PostgreSQL..." | ||
while ! nc -z db 5432; do | ||
sleep 0.1 | ||
done | ||
echo "PostgreSQL started" | ||
|
||
echo "Running migrations..." | ||
alembic upgrade head | ||
echo "Migrations done" | ||
|
||
if [ "$RELOAD" = "true" ] | ||
then | ||
uvicorn src.main:app --host 0.0.0.0 --port 80 --reload | ||
else | ||
uvicorn src.main:app --host 0.0.0.0 --port 80 | ||
fi | ||
|
||
exec "$@" |