entry.sh 460 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash

# Script to make sure that assets from the frontend have been generated at least
# once so that the backend container doesn't crash on the first launch.

while [ ! -f `dirname $0`/../frontend/webpack-stats.json ]; do
    echo "Waiting for frontend static files to be initialized..."
    sleep 2
done

echo "Frontend staticfiles are ready (NB: not necessarly up-to-date)."
12 13

./manage.py collectstatic --noinput && ./manage.py runserver 0.0.0.0:8000