peregrine/config/server.yaml.example
pyr0ball 044b25e838 feat: add reverse-proxy basepath support (Streamlit MIME fix)
- compose.yml: pass STREAMLIT_SERVER_BASE_URL_PATH from .env into container
  Streamlit prefixes all asset URLs with the path so Caddy handle_path routing works.
  Without this, /static/* requests skip the /peregrine* route → 503 text/plain MIME error.
- config/server.yaml.example: document base_url_path + server_port settings
- .gitignore: ignore config/server.yaml (local gitignored instance of server.yaml.example)
- app/pages/2_Settings.py: add Deployment/Server expander under System tab
  Shows active base URL path from env; saves edits to config/server.yaml + .env;
  prompts user to run ./manage.sh restart to apply.

Refs: https://docs.streamlit.io/develop/api-reference/configuration/config.toml#server.baseUrlPath
2026-03-01 22:49:29 -08:00

14 lines
784 B
Text

# config/server.yaml — Peregrine deployment / server settings
# Copy to config/server.yaml and edit. Gitignored — do not commit.
# Changes require restarting Peregrine to take effect (./manage.sh restart).
# base_url_path: URL prefix when serving Peregrine behind a reverse proxy.
# Leave empty ("") for direct access (http://localhost:8502).
# Set to "peregrine" when proxied at https://example.com/peregrine.
# Maps to STREAMLIT_BASE_URL_PATH in .env → STREAMLIT_SERVER_BASE_URL_PATH
# in the container. See: https://docs.streamlit.io/develop/api-reference/configuration/config.toml#server
base_url_path: ""
# server_port: Port Streamlit listens on inside the container (usually 8501).
# The external/host port is set via STREAMLIT_PORT in .env.
server_port: 8501