Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

35 rader
862 B

  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. # If static files don't exist collect them
  12. if [ ! -d /data/static ]
  13. then
  14. cd /srv/www/pinry
  15. python manage.py collectstatic --noinput
  16. fi
  17. # If database doesn't exist yet create it
  18. if [ ! -f /data/production.db ]
  19. then
  20. cd /srv/www/pinry
  21. python manage.py migrate --noinput --settings=pinry.settings.docker
  22. fi
  23. # Fix all settings after all commands are run
  24. chown -R www-data:www-data /data
  25. # start all process
  26. /usr/sbin/nginx
  27. cd /srv/www/pinry/
  28. /scripts/_start_gunicorn.sh