Makefile 636 B

12345678910111213141516171819202122232425262728293031323334
  1. start:
  2. gunicorn -w 2 -b 0.0.0.0:18000 -k uvicorn.workers.UvicornWorker server:app --daemon
  3. @sleep 1s
  4. @ps -ef | grep gunicorn
  5. stop:
  6. @pkill -f gunicorn
  7. @sleep 1s
  8. @ps -ef | grep gunicorn
  9. restart:
  10. stop
  11. start
  12. status:
  13. @ps -ef | grep gunicorn
  14. debug:
  15. python3 server.py
  16. log:
  17. @tail -f log/runtime.log
  18. help:
  19. @echo "make start => start server"
  20. @echo "make stop => stop server"
  21. @echo "make restart => restart server"
  22. @echo "make status => check server status"
  23. @echo "make debug => python3 server.py"
  24. @echo "make log => print log"
  25. @echo "make help => help"
  26. .PHONY: start stop restart status debug help log