import os from webapi import create_app app = create_app() if __name__ == "__main__": # Default avoids port 5000 — on macOS that's squatted by the AirPlay # Receiver service (ControlCenter), which answers with a bare 403 and # makes this look like a broken server rather than "port taken." # Docker's entrypoint overrides this back to 5000 for the container's # own internal port (see docker-entrypoint.sh), which is fine since # that's an isolated network namespace, not the host. app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 5050)))