mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-27 11:07:10 +02:00
fix(docker:single): procrastinate starts before django
This commit is contained in:
@@ -4,5 +4,11 @@ set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
rm -f /tmp/migrations_complete
|
||||
|
||||
python manage.py migrate
|
||||
|
||||
# Create flag file to signal migrations are complete
|
||||
touch /tmp/migrations_complete
|
||||
|
||||
exec python manage.py runserver 0.0.0.0:8000
|
||||
|
||||
@@ -4,4 +4,12 @@ set -o errexit
|
||||
set -o nounset
|
||||
|
||||
|
||||
# Wait for migrations to complete
|
||||
until [ -f /tmp/migrations_complete ]; do
|
||||
echo "Procastinate is waiting for web app to start..."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
rm -f /tmp/migrations_complete
|
||||
|
||||
exec watchfiles --filter python "python manage.py procrastinate worker"
|
||||
|
||||
Reference in New Issue
Block a user