This commit is contained in:
nopy 2024-07-06 18:50:10 +08:00
commit 5a008f33a3
2 changed files with 4 additions and 8 deletions

View File

@ -3,11 +3,11 @@ FROM base
# 创建一个用户运行flask
RUN useradd -m -s /bin/bash flask && \
RUN useradd -m -s /bin/bash flask && \
chown -R flask:flask /home/flask && \
mkdir -p /var/log/flask-app && touch /var/log/flask-app/flask-app.err.log && touch /var/log/flask-app/flask-app.out.log && \
chown -R flask:flask /var/log/flask-app \
&& apt-get -y update \
&& apt-get -y update \
&& apt-get install -y --no-install-recommends \
python3 python3-dev python3-pip python3-venv libssl-dev \
&& apt-get clean \
@ -28,7 +28,7 @@ COPY --from=build-dmpython --chown=flask:flask /home/dmdba/build_artifacts/dmPyt
RUN python3 -m venv "$VIRTUAL_ENV" && \
export FLASK_APP=app.py && \
pip3 install dmPython-2.5.5-cp310-cp310-linux_x86_64.whl && rm dmPython-2.5.5-cp310-cp310-linux_x86_64.whl && \
pip3 install dmPython-2.5.5-cp310-cp310-linux_x86_64.whl && rm dmPython-2.5.5-cp310-cp310-linux_x86_64.whl && \
MAKEFLAGS="-j$(nproc)" pip install -r requirements.txt
COPY --from=build-dmpython /home/dmdba/build_artifacts/libdmdpi.so /usr/lib/

View File

@ -336,10 +336,6 @@ def appendQuestion():
@app.route("/api/teacher/list_pods",methods=['POST']) # 列出pod
def teacher_list_pods():
return list_pods()
@ -350,7 +346,7 @@ def teacher_list_services():
# @app.route("/api/teacher/create_pod") # 创建服务 1为项目实训 0为安装实训
# def teacher_create_pod():
# create_pod(1, "test2")
#
@app.route("/api/teacher/DelPods",methods=['POST']) # 删除服务
def teacher_delete_pod():
name=request.json['name']