#!/usr/bin/env bash
# Docker entrypoint command

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)"

# Set the GCP credentials environment variable
${SCRIPT_DIR}/set_google_creds.sh

# Seed database if data does not exist
${SCRIPT_DIR}/db-seed.sh

# Run supervisor to monitor and ensure gunicorn stays running
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf -n
