diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a3cb77 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +build +.vscode +**__pycache__ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ada780a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY ./requirements.txt /app/requirements.txt + +RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt + +COPY ./src /app/src + +CMD ["fastapi","run", "./src/app.py"] \ No newline at end of file diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..61f7ff3 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,7 @@ +services: + vunerable-web-app: + image: web-app:v0.0.1a + ports: + - "80:8000" + volumes: + - ./data/:/app/data \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..13712cc --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +fastapi[standard] diff --git a/src/app.py b/src/app.py new file mode 100644 index 0000000..0025f2d --- /dev/null +++ b/src/app.py @@ -0,0 +1,16 @@ +import os +import sqlite3 +from fastapi import FastAPI + + + +app = FastAPI( + docs_url=None, # Disable Swagger UI + redoc_url=None, # Disable ReDoc + openapi_url=None # Disable OpenAPI JSON schema +) + + +@app.get("/") +async def root(): + return {"message": "Hello World"} \ No newline at end of file