#!/bin/bash

if [ -z $BIOMAJ_CONFIG ]; then
    export BIOMAJ_CONFIG=/etc/python3-biomaj3-daemon/config.yml
fi

if [ ! -e /var/cache/python3-biomaj3-daemon/prometheus-multiproc ]; then
    mkdir -p /var/cache/python3-biomaj3-daemon/prometheus-multiproc
fi
export prometheus_multiproc_dir=/var/cache/python3-biomaj3-daemon/prometheus-multiproc
gunicorn -c /etc/python3-biomaj3-daemon/gunicorn_conf.py biomaj_daemon.daemon.biomaj_daemon_web:app
