From d2f25d15edfdd8c2d98a3a08efc8667edc1c5369 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 9 Feb 2026 20:44:14 +0000 Subject: [PATCH] Neu --- backend/Dockerfile | 11 +++++++++++ backend/app.py | 14 ++++++++++++++ backend/requirements.txt | 1 + docker-compose.yml | 11 ++++++++++- {site => frontend/public}/index.html | 1 - 5 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 backend/Dockerfile create mode 100644 backend/app.py create mode 100644 backend/requirements.txt rename {site => frontend/public}/index.html (84%) diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..3bcb3fc --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.12-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY app.py . + +EXPOSE 5000 +CMD ["python", "app.py"] diff --git a/backend/app.py b/backend/app.py new file mode 100644 index 0000000..b918e8b --- /dev/null +++ b/backend/app.py @@ -0,0 +1,14 @@ +from flask import Flask + +app = Flask(__name__) + +@app.get("/health") +def health(): + return {"status": "ok"} + +@app.get("/") +def index(): + return "Wedding backend is running." + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=5000) diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 0000000..7e10602 --- /dev/null +++ b/backend/requirements.txt @@ -0,0 +1 @@ +flask diff --git a/docker-compose.yml b/docker-compose.yml index c3a89f3..3542ee0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,4 +6,13 @@ services: ports: - "127.0.0.1:8080:80" volumes: - - ./site:/usr/share/nginx/html:ro + - ./frontend/public:/usr/share/nginx/html:ro + + backend: + build: ./backend + container_name: wedding-backend + restart: unless-stopped + ports: + - "127.0.0.1:5000:5000" + volumes: + - ./data/uploads:/app/uploads diff --git a/site/index.html b/frontend/public/index.html similarity index 84% rename from site/index.html rename to frontend/public/index.html index 1d94e6a..7de1aa7 100644 --- a/site/index.html +++ b/frontend/public/index.html @@ -7,6 +7,5 @@

Hallo Welt 👋

-

Wedding-App läuft via Docker Compose 🎉