From b74df84b5006fbc8cd6575b8c3d904fb192a28a5 Mon Sep 17 00:00:00 2001 From: hiltay <904108079@qq.com> Date: Tue, 7 Feb 2023 22:40:22 +0800 Subject: [PATCH] deploy docker change --- deploy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy.py b/deploy.py index 24653c00d70f..620f4e9587b6 100644 --- a/deploy.py +++ b/deploy.py @@ -35,8 +35,8 @@ def server_deploy(port): port = 8000 server_sh += f"export EXPOSE_PORT={port}" server_sh += """ - nohup python3 -u ${BASE_PATH}/hexo_circle_of_friends/run.py > /dev/null & - nohup python3 -u ${BASE_PATH}/api/main.py > /dev/null & + nohup python3 -u ${BASE_PATH}/hexo_circle_of_friends/run.py > /dev/null 2>&1 & + nohup python3 -u ${BASE_PATH}/api/main.py > /dev/null 2>&1 & """ f.write(server_sh.strip()) os.system("chmod a+x temp.sh && ./temp.sh && rm -f temp.sh") @@ -72,9 +72,9 @@ def server_deploy(port): docker_port = 8000 os.system(f"docker run -di --name circle -p {docker_port}:8000 -v /tmp/:/tmp/ yyyzyyyz/fcircle:latest") # os.system("docker exec circle nohup python3 -u ./hexo_circle_of_friends/run.py > /tmp/crawler_stdout.log 2>&1 &") - os.system("docker exec circle nohup python3 -u ./hexo_circle_of_friends/run.py > /dev/null &") + os.system("docker exec circle nohup python3 -u ./hexo_circle_of_friends/run.py > /dev/null 2>&1 &") # os.system("docker exec circle nohup python3 -u ./api/main.py > /tmp/api_stdout.log 2>&1 &") - os.system("docker exec circle nohup python3 -u ./api/main.py > /dev/null &") + os.system("docker exec circle nohup python3 -u ./api/main.py > /dev/null 2>&1 &") print("已部署!") elif r == "2": os.system("docker stop circle && docker rm circle && docker rmi yyyzyyyz/fcircle:latest")