# Copyright (c) 2026 Krzysztof Rudnicki. MIT licence. """Console entrypoint, so `python -m signal_bot` actually starts the bot. The old readme told people to run `python main.py`, which had no __main__ block and no uvicorn.run() call, so it silently did nothing at all. """ from __future__ import annotations import os import uvicorn # Loopback by default: the only inbound surface is /healthz, and the link to # signal-cli-rest-api is outbound. Override with BIND_HOST when containerised. DEFAULT_HOST = "127.0.0.1" DEFAULT_PORT = 8000 def main() -> None: """Run the ASGI app under uvicorn.""" uvicorn.run( "signal_bot.app:app", host=os.getenv("BIND_HOST", DEFAULT_HOST), port=int(os.getenv("BIND_PORT", str(DEFAULT_PORT))), ) if __name__ == "__main__": main()