Skip to content

Commit

Permalink
deploy docker change
Browse files Browse the repository at this point in the history
  • Loading branch information
hiltay committed Feb 7, 2023
1 parent fb351bf commit b74df84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deploy.py
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit b74df84

Please sign in to comment.