media-rip/backend/start.py
xpltd 43ddf43951 Purge intervals: hours→minutes, default ON at 1440min (24h)
- PurgeConfig: max_age_hours→max_age_minutes (default 1440)
- PurgeConfig: privacy_retention_hours→privacy_retention_minutes (default 1440)
- PurgeConfig: enabled default False→True
- PurgeConfig: cron default every minute (was daily 3am)
- Purge scheduler runs every minute for minute-granularity testing
- All API fields renamed: purge_max_age_minutes, privacy_retention_minutes
- Frontend admin panel inputs show minutes with updated labels
- Updated test assertions for new defaults
2026-03-21 20:33:13 -05:00

31 lines
680 B
Python

#!/usr/bin/env python
"""media.rip() entrypoint — reads config and launches uvicorn with the correct port."""
import os
import sys
def main():
# Port from env var (MEDIARIP__SERVER__PORT) or default 8000
port = os.environ.get("MEDIARIP__SERVER__PORT", "8000")
host = os.environ.get("MEDIARIP__SERVER__HOST", "0.0.0.0")
sys.exit(
os.execvp(
"python",
[
"python",
"-m",
"uvicorn",
"app.main:app",
"--host",
host,
"--port",
port,
],
)
)
if __name__ == "__main__":
main()