FROM ccr.ccs.tencentyun.com/gm-ai/like-configs:test as configs
FROM ccr.ccs.tencentyun.com/gm-ai/alpha-python:3.6
COPY --from=configs /etc/gm-config /etc/gm-config

RUN mkdir -p /data/log/saturn/app
COPY ./requirements.txt /srv/apps/saturn/
WORKDIR /srv/apps/saturn/
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

COPY . .
ENV PROJECT_ENV=test
COPY ./deploy/test/settings_local.py ./settings/
CMD bash -c 'source ~/.bashrc && gunicorn saturn.wsgi:application -w 16 -b 0.0.0.0:80 -k gevent'
