mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-24 18:30:23 +08:00
Update manage.py
This commit is contained in:
parent
c520f0e43e
commit
adf375e733
@ -74,14 +74,16 @@ def get_my_app(app_name=None):
|
|||||||
|
|
||||||
def install_app(app_name):
|
def install_app(app_name):
|
||||||
# check directory
|
# check directory
|
||||||
docker.create_app_directory(app_name)
|
if docker.create_app_directory(app_name):
|
||||||
# check port
|
# check port
|
||||||
docker.check_app_compose(app_name)
|
docker.check_app_compose(app_name)
|
||||||
cmd = "cd /data/apps/"+app_name+" && sudo docker compose up -d"
|
cmd = "cd /data/apps/"+app_name+" && sudo docker compose up -d"
|
||||||
t1 = Thread(target=shell_execute.execute_command_output_all, args=(cmd,))
|
t1 = Thread(target=shell_execute.execute_command_output_all, args=(cmd,))
|
||||||
t1.start()
|
t1.start()
|
||||||
ret = Response(code=const.RETURN_SUCCESS, message="应用正在启动中,请过几分钟再查询")
|
ret = Response(code=const.RETURN_SUCCESS, message="应用正在启动中,请过几分钟再查询")
|
||||||
ret = ret.dict()
|
ret = ret.dict()
|
||||||
|
else:
|
||||||
|
ret = Response(code=const.RETURN_FAIL , message="目前不支持安装此App")
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def if_app_exits(app_name):
|
def if_app_exits(app_name):
|
||||||
|
Loading…
Reference in New Issue
Block a user