FROM maillists-pybase:local

ENV UI_PROCESSES=2

# log request timings for UI/API components based on this image
COPY etc/nginx/worker.lua /etc/nginx/worker.lua

RUN ln -s /etc/supervisor/maillists/ml-uwsgi.conf /etc/supervisor/conf.d/ml-uwsgi.conf
RUN ln -s /etc/supervisor/maillists/ml-nginx.conf /etc/supervisor/conf.d/nginx.conf

RUN ln -s /etc/monrun/conf.default/cron.conf /etc/monrun/conf.d/cron.conf
RUN ln -s /etc/monrun/conf.default/graphite_sender.conf /etc/monrun/conf.d/graphite_sender.conf
RUN ln -s /etc/monrun/ml-ui-checks.conf /etc/monrun/conf.d/ml-ui-checks.conf

ENTRYPOINT ["/docker-entrypoint-ui.sh"]

CMD ["supervisord", "-n"]