From edd20246fedc08034d0e22f45bf9ba18daf60475 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 22 Aug 2026 23:47:07 +0000 Subject: [PATCH] initial: hermes demo --- .dockerignore | 3 +++ Dockerfile | 7 +++++++ app.py | 32 ++++++++++++++++++++++++++++++++ requirements.txt | 2 ++ 4 files changed, 44 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 app.py create mode 100644 requirements.txt diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8e2eca2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +__pycache__ +*.pyc +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b9bf073 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/app.py b/app.py new file mode 100644 index 0000000..20171a7 --- /dev/null +++ b/app.py @@ -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 """ + +Hermes Demo on Coolify + +

Hallo from Hermes! Deployed via Gitea + Coolify

+
+

Project: xdxzkraicftvn71gpje7mpjw

+

Source: gitea.hellobaka.com/opatel99/hermes-demo

+

Status: live

+
+

/health | /api/hello

+""" + +@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"} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..364e2ee --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +fastapi +uvicorn[standard]