entrypoint.sh 344 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. set -e
  3. dever_python()
  4. {
  5. e=${1}" "${2}"/main.py"
  6. eval $e
  7. echo $e
  8. echo 'Python web init process complete; ready for start up.'
  9. }
  10. dever_start()
  11. {
  12. if [ -n "$PYTHON_PATH" ] ; then
  13. dever_python $1 $PYTHON_PATH
  14. else
  15. dever_python $1 $2
  16. fi
  17. }
  18. if [ "$1" = 'python-web' ]; then
  19. p="/src"
  20. m="python"
  21. dever_start $m $p
  22. fi
  23. exec sh