修改运行环境
This commit is contained in:
parent
8f700b8308
commit
0a4aaab824
@ -11,8 +11,6 @@ COPY ../requirements.txt /app/requirements.txt
|
|||||||
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
RUN pip install -U gunicorn -i https://pypi.tuna.tsinghua.edu.cn/simple
|
RUN pip install -U gunicorn -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
|
||||||
# RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
|
||||||
# RUN sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
|
||||||
RUN apt-get clean
|
RUN apt-get clean
|
||||||
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
|
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ services:
|
|||||||
- ../src:/app/src
|
- ../src:/app/src
|
||||||
- ../saves_dev:/app/saves
|
- ../saves_dev:/app/saves
|
||||||
- ../src/static/config.dev.yaml:/app/src/static/config.yaml
|
- ../src/static/config.dev.yaml:/app/src/static/config.yaml
|
||||||
- ${MODEL_DIR}:${MODEL_DIR} # 如果出现 undefined volume MODEL_DIR: invalid compose project,请添加此环境变量或者注释此行
|
# - ${MODEL_DIR}:${MODEL_DIR} # 如果出现 undefined volume MODEL_DIR: invalid compose project,请添加此环境变量或者注释此行
|
||||||
ports:
|
ports:
|
||||||
- "5050:5050"
|
- "5050:5050"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@ -6,7 +6,8 @@ WORKDIR /app
|
|||||||
COPY ./web/package*.json ./
|
COPY ./web/package*.json ./
|
||||||
|
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
RUN npm install --registry https://registry.npmmirror.com --verbose --force
|
RUN npm install --verbose --force
|
||||||
|
# RUN npm install --registry http://mirrors.cloud.tencent.com/npm/ --verbose --force
|
||||||
|
|
||||||
# 复制源代码
|
# 复制源代码
|
||||||
COPY ./web .
|
COPY ./web .
|
||||||
@ -21,7 +22,8 @@ FROM node:latest AS build-stage
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./web/package*.json ./
|
COPY ./web/package*.json ./
|
||||||
RUN npm install --registry https://registry.npmmirror.com --force
|
RUN npm install --force
|
||||||
|
# RUN npm install --registry https://registry.npmmirror.com --force
|
||||||
|
|
||||||
COPY ./web .
|
COPY ./web .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user