minimal building container

This commit is contained in:
2025-12-15 22:27:26 +10:00
parent aec37cb714
commit 5c7d16f418
5 changed files with 38 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
build
.vscode
**__pycache__

11
Dockerfile Normal file
View File

@@ -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"]

7
compose.yaml Normal file
View File

@@ -0,0 +1,7 @@
services:
vunerable-web-app:
image: web-app:v0.0.1a
ports:
- "80:8000"
volumes:
- ./data/:/app/data

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
fastapi[standard]

16
src/app.py Normal file
View File

@@ -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"}