Makefile 708 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. test:
  19. @cd server && python3 test.py
  20. log:
  21. @tail -f log/runtime.log
  22. help:
  23. @echo "make start => start server"
  24. @echo "make stop => stop server"
  25. @echo "make restart => restart server"
  26. @echo "make status => check server status"
  27. @echo "make debug => python3 server.py"
  28. @echo "make log => print log"
  29. @echo "make help => help"
  30. .PHONY: start stop restart status debug help log