16 lines
553 B
Plaintext
16 lines
553 B
Plaintext
# 基于python3.6镜像来构建镜像
|
|
FROM python:3.6-slim
|
|
MAINTAINER guyue55 <guyuecw@qq.com>
|
|
ENV TIME_ZONE=Asia/Shanghai
|
|
RUN echo "${TIME_ZONE}" > /etc/timezone \
|
|
&& ln -sf /usr/share/zoneinfo/${TIME_ZONE} /etc/localtime
|
|
|
|
ADD . /app
|
|
WORKDIR /app
|
|
|
|
RUN pip install --no-cache-dir --trusted-host mirrors.aliyun.com -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt
|
|
RUN find . -name "*.pyc" -delete
|
|
|
|
EXPOSE 8001
|
|
|
|
CMD gunicorn -c soulbook/config/gunicorn.py --worker-class sanic.worker.GunicornWorker soulbook.server:app --log-level=debug |