Last active
March 24, 2022 11:16
-
-
Save radimih/0f7e5970e7808accd08713657e8a5c0a to your computer and use it in GitHub Desktop.
Точка входа в Django-контейнер
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
#!/bin/bash | |
while ! nc -z db 3306 | |
do | |
echo "*** looks like mysql is not ready yet" | |
sleep 3 | |
done | |
echo "+++ Mysql server is ready +++" | |
python manage.py migrate # Apply database migrations | |
python manage.py collectstatic --noinput # Collect static files | |
echo "Starting django dev server" | |
exec python manage.py runserver 0.0.0.0:8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment