#!/bin/sh # Production images contain exactly one complete, verified bucket generation. set -eu if [ ! -d /app/data ]; then echo 'Verified search generation is missing from the image' >&2 exit 1 fi # The ASGI entry point verifies all members before using this declared identity. configured="$(python -B -m scripts.search_data_config --identity-only /app/data)" if [ -n "${SEARCH_DATA_GENERATION:-}" ] && [ "$SEARCH_DATA_GENERATION" != "$configured" ]; then echo 'Configured search generation differs from the verified image' >&2 exit 1 fi if [ "${SEARCH_DATA_DIRECTORY:-/app/data}" != /app/data ]; then echo 'Configured search directory differs from the verified image' >&2 exit 1 fi SEARCH_DATA_GENERATION="$configured" SEARCH_DATA_DIRECTORY=/app/data export SEARCH_DATA_GENERATION SEARCH_DATA_DIRECTORY exec uvicorn backend.search.infrastructure.runtime_entry:app --host 0.0.0.0 --port 7860 --log-level info --loop uvloop --http httptools