target-revenue/scripts/docker-entrypoint.sh

16 lines
507 B
Bash
Raw Normal View History

#!/bin/sh
# Container entrypoint (WP-0011): combined Trust Service + Control Plane.
set -e
# Optional: run migrations when TRF_RUN_MIGRATIONS=1 (used by migrate Job).
if [ "${TRF_RUN_MIGRATIONS:-0}" = "1" ]; then
exec python /usr/local/bin/apply_migrations.py
fi
if [ "${TRF_BOOTSTRAP_BINKY:-0}" = "1" ]; then
exec python /usr/local/bin/bootstrap_binky.py
fi
exec python -m uvicorn target_revenue.service.combined:app \
--host 0.0.0.0 \
--port 8000 \
--proxy-headers \
--forwarded-allow-ips='*'