|
@@ -5,10 +5,13 @@ echo "waiting for dependencies ..."
|
|
|
./wait
|
|
|
|
|
|
# start cron
|
|
|
-/root/cronhook/start-cron.sh &
|
|
|
+# Start child process that starts grand-child process.
|
|
|
+# After the child process's death, the grand-child will be adopted by init.
|
|
|
+# See https://stackoverflow.com/a/20338327
|
|
|
+( /root/cronhook/start-cron.sh & )
|
|
|
|
|
|
# migrate database
|
|
|
python manage.py migrate || exit 1
|
|
|
|
|
|
echo Finished migrations, starting API server ...
|
|
|
-uwsgi --ini uwsgi.ini
|
|
|
+exec uwsgi --ini uwsgi.ini
|