25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

start.sh 935 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. # -----------------------------------------------------------------------------
  3. # docker-pinry /start script
  4. #
  5. # Will setup database and static files if they don't exist already, if they do
  6. # just continues to run docker-pinry.
  7. #
  8. # Authors: Isaac Bythewood
  9. # Updated: Aug 19th, 2014
  10. # -----------------------------------------------------------------------------
  11. PROJECT_ROOT="/pinry"
  12. bash ${PROJECT_ROOT}/docker/scripts/bootstrap.sh
  13. # If static files don't exist collect them
  14. cd ${PROJECT_ROOT}
  15. python manage.py collectstatic --noinput --settings=pinry.settings.docker
  16. # If database doesn't exist yet create it
  17. if [ ! -f /data/production.db ]
  18. then
  19. cd ${PROJECT_ROOT}
  20. python manage.py migrate --noinput --settings=pinry.settings.docker
  21. fi
  22. # Fix all settings after all commands are run
  23. chown -R www-data:www-data /data
  24. # start all process
  25. /usr/sbin/nginx
  26. cd ${PROJECT_ROOT}
  27. ./docker/scripts/_start_gunicorn.sh