FROM python:3.6.6

COPY ./deploy/aliyun.list /etc/apt/sources.list
COPY ./deploy/pip.conf /etc/pip.conf
COPY ./requirements.txt /env/requirements.txt

RUN pip install -r /env/requirements.txt

WORKDIR /app
ADD . /app

ENV YINLP_ENV prod
ENV C_FORCE_ROOT yes
ENV TZ Asia/Shanghai

RUN mkdir -p /data/logs/proj

CMD celery -A celery_worker.celery worker -c ${WORKER_NUM:-8} -l ${LOG_LEVEL:-info}
