# Development: Add debug binaries to PATH
export PATH="$PWD/target/debug:$PATH"

# Force public PyPI index to prevent internal/corporate mirrors from leaking into lockfiles
export UV_INDEX_URL="https://pypi.org/simple/"
unset UV_EXTRA_INDEX_URL 2>/dev/null || true

# Database connection (used by SQLX and Rise backend)
export DATABASE_URL="postgres://rise:rise123@localhost:5432/rise"

# Rise-specific configuration
export RISE_CONFIG_RUN_MODE="development"
export RISE_MANAGED_BUILDKIT="true"
export RISE_MANAGED_BUILDKIT_HOST_NETWORK=true
export RISE_MANAGED_BUILDKIT_INSECURE_REGISTRIES="rise-registry:5000,localhost:5000,127.0.0.1:5000,rise-jfrog:8082,localhost:3082"

export VAULT_ADDR=http://localhost:8200
export VAULT_TOKEN=root

source_env_if_exists .env

if which mise >/dev/null; then
    mise install
    watch_file mise.toml
    . <(mise activate)
fi
