From 400ba0cb6d8373cd5d1e3af15a638997463b4eb5 Mon Sep 17 00:00:00 2001 From: shenshuo <191715030@qq.com> Date: Tue, 19 Nov 2024 11:57:59 +0800 Subject: [PATCH] =?UTF-8?q?2024=E5=B9=B411=E6=9C=8813=E6=97=A5=20=20?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=A0=B9=E5=9F=9Fcookie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++-- mg/handlers/login_v5_handler.py | 12 ++++++------ startup.py | 7 ++----- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4725a35..19226c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN yum install -y python3 python3-pip git && \ # 升级 pip 并安装 codo_sdk RUN python3 -m pip install --upgrade pip && \ - pip install -U git+https://github.com/ss1917/codo_sdk.git + pip install -U git+https://github.com/ss1917/ops_sdk.git # 设置环境变量 ARG SERVICE_NAME @@ -30,4 +30,4 @@ RUN pip install -r docs/requirements.txt &> /dev/null && \ EXPOSE 8000 CMD /data/run-py.sh ${SERVICE_NAME} -### docker build --no-cache --build-arg SERVICE_NAME=admin-mg-api . -t codo-admin-image \ No newline at end of file +### docker build --no-cache --build-arg SERVICE_NAME=mg . -t codo-admin-image \ No newline at end of file diff --git a/mg/handlers/login_v5_handler.py b/mg/handlers/login_v5_handler.py index 927cbdf..b4ce2b7 100644 --- a/mg/handlers/login_v5_handler.py +++ b/mg/handlers/login_v5_handler.py @@ -107,13 +107,13 @@ async def post(self, *args, **kwargs): # logging.info(f"设置主域Cookie {root_domain}") # except Exception as err: # logging.error(f"设置主域cookie失败 {err}") - # + #TODO 清理外层数据 real_login_dict = dict(code=0, msg='登录成功', - # username=user_info.username, - # nickname=user_info.nickname, - # auth_key=auth_key, - # avatar=user_info.avatar, - # c_url=c_url, + username=user_info.username, + nickname=user_info.nickname, + auth_key=auth_key, + avatar=user_info.avatar, + c_url=c_url, data=dict(username=user_info.username, nickname=user_info.nickname, auth_key=auth_key, avatar=user_info.avatar, c_url=c_url)) return self.write(real_login_dict) diff --git a/startup.py b/startup.py index db71244..0aa2ac3 100644 --- a/startup.py +++ b/startup.py @@ -35,11 +35,8 @@ def __init__(self, service='api', progressid=''): fire.Fire(MyProgram) """ -python3 startup.py --service=api --port=8010 -python3 startup.py --service=sub_log -python3 startup.py --service=gw_log +python3 startup.py --service=mg --port=8010 python3 startup.py --service=init -docker build --no-cache --build-arg SERVICE_NAME=admin-mg-api . -t ops_mg_image -docker build --build-arg SERVICE_NAME=gw_log . -t ops_mg_log_image +docker build --no-cache --build-arg SERVICE_NAME=mg . -t codo-admin-image """