Initial commit: FastAPI Hello-World app for hello-test
Deploy App / deploy (push) Successful in 24s

This commit is contained in:
2026-07-08 13:38:18 +02:00
commit af68c39ed0
5 changed files with 55 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
name: Deploy App
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Deploy to Server
run: |
APP_DIR="/opt/aicds/apps/${GITHUB_REPOSITORY#*/}"
mkdir -p $APP_DIR
cp -a . $APP_DIR/
cd $APP_DIR
docker compose down || true
docker compose up -d --build
docker image prune -f
+3
View File
@@ -0,0 +1,3 @@
.claude/
__pycache__/
*.pyc
+11
View File
@@ -0,0 +1,11 @@
FROM python:3.11-slim
WORKDIR /app
RUN pip install --no-cache-dir fastapi uvicorn[standard]
COPY main.py .
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
+13
View File
@@ -0,0 +1,13 @@
services:
app:
build: .
networks:
- agent-net
labels:
- "traefik.enable=true"
- "traefik.http.routers.hellotest.rule=Host(`hello-test.aicds.ch`)"
- "traefik.http.routers.hellotest.entrypoints=websecure"
- "traefik.http.routers.hellotest.tls.certresolver=myresolver"
networks:
agent-net:
external: true
+8
View File
@@ -0,0 +1,8 @@
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"message": "Hello from AICDS!"}