添加docker文件

This commit is contained in:
Administrator 2023-07-13 13:52:08 +08:00
parent a74e741e74
commit 87006bf6e9
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com
# 复制项目代码到容器内的 /app 目录 # 复制项目代码到容器内的 /app 目录
# 设置环境变量,指定端口号和主模块 # 设置环境变量,指定端口号和主模块
ENV PORT=8000 ENV PORT=8006
ENV MODULE_NAME=my_fastapi_app.main:app ENV MODULE_NAME=my_fastapi_app.main:app
# 暴露指定的端口 # 暴露指定的端口

View File

@ -7,7 +7,7 @@ services:
volumes: volumes:
- ../daily:/home/daily - ../daily:/home/daily
ports: ports:
- "8001:8082" - "8006:8006"
networks: networks:
- app - app
command: command: