Makefile 668 B

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