feat: new default port 17922
This commit is contained in:
1 parent
b324dc3a6b
commit
caeb47be11
3 files changed
+4
-3
No files matched your search
@@ -455,6 +455,7 @@ async def main():
|
|||||||
# 3. Start Server
|
# 3. Start Server
|
||||||
# manually trigger server shutdown, avoids hypercorn installing signal handlers
|
# manually trigger server shutdown, avoids hypercorn installing signal handlers
|
||||||
shutdown_event = asyncio.Event()
|
shutdown_event = asyncio.Event()
|
||||||
|
# TODO: get port from env or don't pass it (actually server should handle none)
|
||||||
server_task = asyncio.create_task(start_server(horde_app, shutdown_event))
|
server_task = asyncio.create_task(start_server(horde_app, shutdown_event))
|
||||||
|
|
||||||
# 4. Graceful Termination
|
# 4. Graceful Termination
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ def encode_json(value):
|
|||||||
return repr(value)
|
return repr(value)
|
||||||
return json.dumps(value, default=encode_unknown)
|
return json.dumps(value, default=encode_unknown)
|
||||||
|
|
||||||
async def start_server(app, shutdown_event):
|
async def start_server(app, shutdown_event, port=17922):
|
||||||
server = Quart(__name__, static_folder=frontend_path)
|
server = Quart(__name__, static_folder=frontend_path)
|
||||||
server.secret_key = 'horde-secret'
|
server.secret_key = 'horde-secret'
|
||||||
auth_manager = QuartAuth(server, mode="bearer")
|
auth_manager = QuartAuth(server, mode="bearer")
|
||||||
@@ -663,4 +663,4 @@ async def start_server(app, shutdown_event):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await server.run_task(debug=True, shutdown_trigger=shutdown_event.wait)
|
await server.run_task(debug=True, shutdown_trigger=shutdown_event.wait, port=port)
|
||||||
@@ -18,7 +18,7 @@ server {
|
|||||||
ssl_certificate_key /etc/letsencrypt/live/hub.hordelab.com/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/hub.hordelab.com/privkey.pem;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:5000;
|
proxy_pass http://localhost:17922;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
||||||
# Websocket support
|
# Websocket support
|
||||||
|
|||||||
Reference in new issue
Block a user