entrypoint.sh 439 B

1234567891011121314151617
  1. #!/bin/bash -e
  2. # wait for dependencies
  3. echo "waiting for dependencies ..."
  4. ./wait
  5. # start cron
  6. # Start child process that starts grand-child process.
  7. # After the child process's death, the grand-child will be adopted by init.
  8. # See https://stackoverflow.com/a/20338327
  9. ( /root/cronhook/start-cron.sh & )
  10. # migrate database
  11. python manage.py migrate || exit 1
  12. echo Finished migrations, starting API server ...
  13. exec uwsgi --ini uwsgi.ini