You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 5 години
преди 5 години
преди 4 години
преди 5 години
преди 4 години
преди 5 години
преди 5 години
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