123
This commit is contained in:
parent
4b8313e859
commit
9f6f151dcb
|
@ -3,11 +3,11 @@ FROM base
|
||||||
|
|
||||||
|
|
||||||
# 创建一个用户运行flask
|
# 创建一个用户运行flask
|
||||||
RUN useradd -m -s /bin/bash flask && \
|
RUN useradd -m -s /bin/bash flask && \
|
||||||
chown -R flask:flask /home/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 && \
|
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 \
|
chown -R flask:flask /var/log/flask-app \
|
||||||
&& apt-get -y update \
|
&& apt-get -y update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
python3 python3-dev python3-pip python3-venv libssl-dev \
|
python3 python3-dev python3-pip python3-venv libssl-dev \
|
||||||
&& apt-get clean \
|
&& 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" && \
|
RUN python3 -m venv "$VIRTUAL_ENV" && \
|
||||||
export FLASK_APP=app.py && \
|
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
|
MAKEFLAGS="-j$(nproc)" pip install -r requirements.txt
|
||||||
|
|
||||||
COPY --from=build-dmpython /home/dmdba/build_artifacts/libdmdpi.so /usr/lib/
|
COPY --from=build-dmpython /home/dmdba/build_artifacts/libdmdpi.so /usr/lib/
|
||||||
|
|
|
@ -336,10 +336,6 @@ def appendQuestion():
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/teacher/list_pods",methods=['POST']) # 列出pod
|
@app.route("/api/teacher/list_pods",methods=['POST']) # 列出pod
|
||||||
def teacher_list_pods():
|
def teacher_list_pods():
|
||||||
return list_pods()
|
return list_pods()
|
||||||
|
@ -350,7 +346,7 @@ def teacher_list_services():
|
||||||
# @app.route("/api/teacher/create_pod") # 创建服务 1为项目实训, 0为安装实训
|
# @app.route("/api/teacher/create_pod") # 创建服务 1为项目实训, 0为安装实训
|
||||||
# def teacher_create_pod():
|
# def teacher_create_pod():
|
||||||
# create_pod(1, "test2")
|
# create_pod(1, "test2")
|
||||||
#
|
|
||||||
@app.route("/api/teacher/DelPods",methods=['POST']) # 删除服务
|
@app.route("/api/teacher/DelPods",methods=['POST']) # 删除服务
|
||||||
def teacher_delete_pod():
|
def teacher_delete_pod():
|
||||||
name=request.json['name']
|
name=request.json['name']
|
||||||
|
|
Loading…
Reference in New Issue