Python Basic Webserver
Minimal Flask server with health endpoint and Docker support
A minimal Python web server using Flask with a health check endpoint. Includes Docker containerization, Kubernetes deployment manifests, and GitHub Actions CI/CD workflow. Ideal for microservices and API backends.
terchrisPrerequisites
Files
Files (10)
├── .dockerignore ├── .gitignore ├── Dockerfile ├── README-python-basic-webserver.md ├── requirements.txt ├── template-info.yaml ├── .github/ │ └── workflows/ │ └── urbalurba-build-and-push.yaml ├── app/ │ └── app.py └── manifests/ ├── deployment.yaml └── kustomization.yaml
Related templates
①What gets set up
When you install this template, the following are configured for you:
- Adds ipython, pytest-cov, uv, and VS Code extensions for Python development
②Setup
uv venv
uv pip install -r requirements.txt③Run the Flask app
uv run python app/app.pyFlask runs on port 3000. VS Code auto-forwards the port — click the globe icon in the Ports tab.
Architecture
These diagrams are auto-generated from the template's metadata. Click any diagram to enlarge.
Deployment
Components
Template README
The Python Basic Webserver template is a simple hello world app built with Flask that displays "Hello world" on a web page. The purpose of this simple app is to verify that the development environment is set up and ready. See more documentation at http://localhost:3000/docs/templates/basic-web-server/python-basic-webserver
HTTP API
| Path | Method | Response |
|---|---|---|
/ | GET | Plain text: greeting, template id python-basic-webserver, and formatted time/date |
Entry point and port
- File:
app/app.py - Port: 3000 (variable
portin the module; matches the DockerfileEXPOSE) - Run:
pip install -r requirements.txtthenpython app/app.py(Flask debug is enabled in__main__— auto-reload on save)
Changing the app
- Add Flask routes with
@app.routeand extendapp.py, or split into blueprints underapp/.