diff options
author | Jason Forhise <[email protected]> | 2022-03-15 20:48:50 +0800 |
---|---|---|
committer | Jason Forhise <[email protected]> | 2022-03-15 20:48:50 +0800 |
commit | 3fa4e516c81a837149f5ef2fdbe7eedf50daeb8d (patch) | |
tree | da36598fc43e0be76fc7ec092be37f386afee22a /Dockerfile | |
parent | de29697555b4a92f3731270994c748654cb7a7e5 (diff) | |
download | ATRI-3fa4e516c81a837149f5ef2fdbe7eedf50daeb8d.tar.gz ATRI-3fa4e516c81a837149f5ef2fdbe7eedf50daeb8d.tar.bz2 ATRI-3fa4e516c81a837149f5ef2fdbe7eedf50daeb8d.zip |
优化了 Docker 的部署方式
现在可以在宿主机访问日志等会变动的文件与配置文件
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6f3f8a2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM flyingjoe/uvicorn-gunicorn-fastapi:python3.9-slim + +WORKDIR /app + +ENV PATH="${PATH}:/root/.local/bin" + +COPY ./ /app/ + +RUN /usr/local/bin/python -m pip install --no-cache-dir --upgrade --quiet pip \ + && pip install --no-cache-dir --upgrade --quiet -r requirements.txt + +VOLUME /app/accounts /app/data + +CMD python3 main.py
\ No newline at end of file |