![](/img/trans.png)
[英]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.