1#!/bin/bash
 2
 3# Start release webserver
 4
 5cd /app/${CHART_REPO_NAME}
 6
 7echo "Expanding log.config template"
 8envsubst '$CHART_LOG_DIR' < docker/project/log.config.tmpl > /app/log.config
 9
10# Exec is safe here as there's no sleep call because we will intantly restart the webserver on any
11# crash
12
13echo "Starting dynamic webserver on ${HOSTNAME}:${CHART_PORT}"
14PYTHONPATH="/app/chart:/app/${CHART_REPO_NAME}:/app/chart/chart-rest" \
15          exec gunicorn ${CHART_PROJECT_NAME}.wsgi:application \
16          --bind 0.0.0.0:${CHART_PORT} \
17          --config /app/${CHART_REPO_NAME}/docker/project/gunicorn.config.py \
18          --log-config /app/log.config