A minimal Flask application with a single GET endpoint. Dockerized for easy deployment.
flask-app/
├── dummy_maestro.py # Main Flask app
├── requirements.txt # Python dependencies
├── Dockerfile # Docker configuration
└── README.md # Instructions
- Python 3.11+ and
pipif running without Docker - Docker installed if running with Docker
-
Clone the repository (or copy the files):
git clone <your-repo-url> cd flask-app
-
Build the Docker image:
docker build -t dummy-maestro . -
Run the container:
docker run -p 8080:8080 dummy-maestro
By passing
-cpus <numver-of-cpus>to docker and appending-w <number-of-workers>to the control you can control the level of parallelism in the server.This will start the app using Gunicorn, a production-grade WSGI server.
-
Test the endpoint:
curl http://0.0.0.0:8080/api/v1/status
Expected response:
Ok
-
Install dependencies:
pip install -r requirements.txt
-
Run the app with Gunicorn (recommended for production):
gunicorn -b 0.0.0.0:8080 dummy_maestro:app
By passing
-w <number-of-workers>you can control the level of parallelism in the server.Or for development/testing only, you can still use:
python dummy_maestro.py
-
Test the endpoint:
curl http://localhost:8080/api/v1/status
Expected response:
Ok