Skip to content

Instantly share code, notes, and snippets.

@radimih
Last active March 24, 2022 11:16
Show Gist options
  • Save radimih/0f7e5970e7808accd08713657e8a5c0a to your computer and use it in GitHub Desktop.
Save radimih/0f7e5970e7808accd08713657e8a5c0a to your computer and use it in GitHub Desktop.
Точка входа в Django-контейнер
#!/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