feat: docker本地调试:

- 1. import不同系统语法不一致
- 2. mysql允许远程访问
This commit is contained in:
eric
2022-12-18 21:12:02 +08:00
parent 4272acb677
commit 1423965912
25 changed files with 106 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
# 1、从官方 Python 基础镜像开始
FROM python:3.9
FROM python:3.10
# 2、将当前工作目录设置为 /code
# 这是放置 requirements.txt 文件和应用程序目录的地方
@@ -13,7 +13,7 @@ COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# 5、复制 FastAPI 项目代码
COPY ./app /code/app
COPY ./cloudcontainers/app /code/app
# 6、运行服务
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
CMD ["uvicorn", "cloudcontainers.app.main:app", "--host", "0.0.0.0", "--port", "80"]