添加docker文件
This commit is contained in:
parent
a74e741e74
commit
87006bf6e9
|
@ -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
|
||||||
|
|
||||||
# 暴露指定的端口
|
# 暴露指定的端口
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue