We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 908b9fe commit 8267c58Copy full SHA for 8267c58
1 file changed
bedevere/__main__.py
@@ -78,20 +78,8 @@ async def health_check(request):
78
app.router.add_post("/", main)
79
app.router.add_get("/health", health_check)
80
81
- socket_path = os.environ.get("SOCKET_PATH")
82
- port = os.environ.get("PORT")
83
-
84
- if socket_path:
85
86
- async def run_with_socket():
87
- runner = web.AppRunner(app)
88
- await runner.setup()
89
- site = web.UnixSite(runner, path=socket_path)
90
- await site.start()
91
- await asyncio.Event().wait()
92
93
- asyncio.run(run_with_socket())
+ if os.path.isdir("/var/run/cabotage"):
+ web.run_app(app, path="/var/run/cabotage/cabotage.sock")
94
else:
95
- if port is not None:
96
- port = int(port)
97
- web.run_app(app, port=port)
+ port = os.environ.get("PORT")
+ web.run_app(app, port=int(port) if port else None)
0 commit comments