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 GM_RPCD_DEPLOY_CONF_PATH="/srv/apps/saturn/app_conf.xml"
ENV PROJECT_ENV=test
COPY ./deploy/test/app_conf.xml .
COPY ./deploy/test/settings_local.py ./settings/
CMD bash -c 'source ~/.bashrc && gunicorn saturn.wsgi:application -w 4 -b 0.0.0.0:80 -k gevent'
