initial: hermes demo

This commit is contained in:
Hermes
2026-08-22 23:47:07 +00:00
commit edd20246fe
4 changed files with 44 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
__pycache__
*.pyc
.git
+7
View File
@@ -0,0 +1,7 @@
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
+32
View File
@@ -0,0 +1,32 @@
from fastapi import FastAPI
from fastapi.responses import HTMLResponse
import os
app = FastAPI()
@app.get("/", response_class=HTMLResponse)
async def home():
return """<!doctype html>
<html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Hermes Demo on Coolify</title>
<style>
body{font-family:system-ui,sans-serif;max-width:720px;margin:40px auto;padding:0 16px;line-height:1.6}
.card{border:1px solid #ddd;border-radius:12px;padding:20px;background:#fafafa}
code{background:#eee;padding:2px 6px;border-radius:4px}
</style></head><body>
<h1>Hallo from Hermes! Deployed via Gitea + Coolify</h1>
<div class="card">
<p>Project: <code>xdxzkraicftvn71gpje7mpjw</code></p>
<p>Source: <a href="https://gitea.hellobaka.com/opatel99/hermes-demo">gitea.hellobaka.com/opatel99/hermes-demo</a></p>
<p>Status: <strong>live</strong></p>
</div>
<p><a href="/health">/health</a> | <a href="/api/hello">/api/hello</a></p>
</body></html>"""
@app.get("/health")
async def health():
return {"status": "ok"}
@app.get("/api/hello")
async def hello():
return {"message": "Hello from Hermes + Coolify + Gitea", "project": "xdxzkraicftvn71gpje7mpjw"}
+2
View File
@@ -0,0 +1,2 @@
fastapi
uvicorn[standard]