Neu
This commit is contained in:
11
backend/Dockerfile
Normal file
11
backend/Dockerfile
Normal file
@@ -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"]
|
||||
14
backend/app.py
Normal file
14
backend/app.py
Normal file
@@ -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)
|
||||
1
backend/requirements.txt
Normal file
1
backend/requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
flask
|
||||
@@ -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
|
||||
|
||||
@@ -7,6 +7,5 @@
|
||||
</head>
|
||||
<body style="font-family: system-ui; padding: 40px;">
|
||||
<h1>Hallo Welt 👋</h1>
|
||||
<p>Wedding-App läuft via Docker Compose 🎉</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user