代码拉取完成,页面将自动刷新
FROM frolvlad/alpine-python3
ENV API_SERVER_HOME=/opt/www
WORKDIR "$API_SERVER_HOME"
COPY "./requirements.txt" "./"
COPY "./app/requirements.txt" "./app/"
COPY "./config.py" "./"
COPY "./tasks" "./tasks"
ARG INCLUDE_POSTGRESQL=false
ARG INCLUDE_UWSGI=false
RUN apk add --no-cache --virtual=.build_dependencies musl-dev gcc python3-dev libffi-dev linux-headers && \
cd /opt/www && \
pip install -r tasks/requirements.txt && \
invoke app.dependencies.install && \
( \
if [ "$INCLUDE_POSTGRESQL" = 'true' ]; then \
apk add --no-cache libpq && \
apk add --no-cache --virtual=.build_dependencies postgresql-dev && \
pip install psycopg2 ; \
fi \
) && \
( if [ "$INCLUDE_UWSGI" = 'true' ]; then pip install uwsgi ; fi ) && \
rm -rf ~/.cache/pip && \
apk del .build_dependencies
COPY "./" "./"
RUN chown -R nobody "." && \
if [ ! -e "./local_config.py" ]; then \
cp "./local_config.py.template" "./local_config.py" ; \
fi
USER nobody
CMD [ "invoke", "app.run", "--no-install-dependencies", "--host", "0.0.0.0" ]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。