21 Star 122 Fork 60

Li-Vincent/leo-api-auto

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile.backend 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
liwh9 提交于 2020-07-16 17:36 . 1. Docker deploy use LEO_API_PLATFORM_PORT
FROM python:3.7
USER root
ENV WORKING_DIR /app/leo-api-platform
ENV LEO_API_PLATFORM_ENV=${LEO_API_PLATFORM_ENV}
ENV LEO_API_PLATFORM_HOST=${LEO_API_PLATFORM_HOST}
ENV LEO_API_PLATFORM_PORT=${LEO_API_PLATFORM_PORT}
ENV LEO_API_PLATFORM_MONGO_HOST=${LEO_API_PLATFORM_MONGO_HOST}
ENV LEO_API_PLATFORM_MONGO_PORT=${LEO_API_PLATFORM_MONGO_PORT}
ENV LEO_API_PLATFORM_MONGO_USERNAME=${LEO_API_PLATFORM_MONGO_USERNAME}
ENV LEO_API_PLATFORM_MONGO_PASSWORD=${LEO_API_PLATFORM_MONGO_PASSWORD}
ENV LEO_API_PLATFORM_MONGO_DBNAME=${LEO_API_PLATFORM_MONGO_DBNAME}
COPY backend ${WORKING_DIR}/backend
COPY ./dist ${WORKING_DIR}/dist
RUN sh -c "echo 'Asia/Shanghai' > /etc/timezone" \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& export ENV LEO_API_PLATFORM_ENV=${LEO_API_PLATFORM_ENV} \
&& export ENV LEO_API_PLATFORM_HOST=${LEO_API_PLATFORM_HOST} \
&& export ENV LEO_API_PLATFORM_PORT=${LEO_API_PLATFORM_PORT} \
&& export ENV LEO_API_PLATFORM_MONGO_HOST=${LEO_API_PLATFORM_MONGO_HOST} \
&& export ENV LEO_API_PLATFORM_MONGO_PORT=${LEO_API_PLATFORM_MONGO_PORT} \
&& export ENV LEO_API_PLATFORM_MONGO_USERNAME=${LEO_API_PLATFORM_MONGO_USERNAME} \
&& export ENV LEO_API_PLATFORM_MONGO_PASSWORD=${LEO_API_PLATFORM_MONGO_PASSWORD} \
&& export ENV LEO_API_PLATFORM_MONGO_DBNAME=${LEO_API_PLATFORM_MONGO_DBNAME} \
&& pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple \
&& cd ${WORKING_DIR}/backend \
&& pip install -r ./requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
ENTRYPOINT cd ${WORKING_DIR}/backend; python run.py;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/Li-Vincent/leo-api-auto.git
[email protected]:Li-Vincent/leo-api-auto.git
Li-Vincent
leo-api-auto
leo-api-auto
master

搜索帮助