Add hosting deployment setup and backend health endpoint
This commit is contained in:
14
backend/.env.example
Normal file
14
backend/.env.example
Normal file
@@ -0,0 +1,14 @@
|
||||
# JWT
|
||||
SECRET_KEY=change-me-in-production
|
||||
ALGORITHM=HS256
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES=43200
|
||||
|
||||
# OpenID Connect (SSO)
|
||||
SSO_ENABLED=false
|
||||
ZITADEL_ISSUER=
|
||||
ZITADEL_CLIENT_ID=
|
||||
ZITADEL_CLIENT_SECRET=
|
||||
|
||||
# URLs
|
||||
BASE_URL=https://panel.example.com
|
||||
FRONTEND_URL=https://panel.example.com
|
||||
@@ -172,6 +172,11 @@ def check_server_access(user: dict, server_name: str):
|
||||
return False
|
||||
return server_name in user.get("servers", [])
|
||||
|
||||
# Healthcheck endpoint for Docker/hosting probes
|
||||
@app.get("/health")
|
||||
async def health():
|
||||
return {"status": "ok"}
|
||||
|
||||
# API для аутентификации
|
||||
|
||||
# OpenID Connect endpoints
|
||||
@@ -1936,4 +1941,4 @@ app.include_router(daemons_router)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||
uvicorn.run(app, host="0.0.0.0", port=4546)
|
||||
|
||||
Reference in New Issue
Block a user