[英]how to specify python interpreter in git post-receive hook?
[英]How do I run a Flask App on a remote server with git hooks post-receive?
我在服务器端添加了一个后接收git钩子,以便烧瓶应用程序在接收后运行。 该脚本有效,该应用程序在服务器上运行。 但是,从客户端进行推送时,即使Flask应用程序已经在服务器上运行,该过程也会陷入困境。
Pushing to root@192.168.XX.XX:~/api/
这是接收后脚本。
#!/bin/sh
# Post-receive hook to make the API
# run back up again after the changes are made.
python3 ../../api_run.py &
exit 0
这是我为解决此问题所做的工作。
代替上一个命令,我添加了一些其他命令以使终端输出静音。
python3 ../../api_run.py > /dev/null 2>&1 &
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.