A simple Flask web app for adding/viewing tasks. Use this to practice SRE workflows.
- Install Python 3.12+.
pip install -r requirements.txtpython app.py- Visit
http://localhost:5000 - Test health:
curl http://localhost:5000/health
- Build:
docker build -t task-tracker . - Run:
docker run -p 5000:5000 task-tracker - Multi-container:
docker-compose up - Test:
curl http://localhost:5000/ready
- Enable Cloud Run API and install gcloud CLI.
gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/task-trackergcloud run deploy task-tracker --image gcr.io/YOUR_PROJECT_ID/task-tracker --platform managed --allow-unauthenticated- Set env vars (e.g., PORT) in the console.
- Logs: Check Flask logs or integrate Prometheus.
- Scale: Add env var for DB (e.g.,
DATABASE_URL). - CI/CD: Update
deploy.ymlsecrets and push to trigger.
For Kubernetes: Use the Dockerfile as base for a Deployment YAML.
- Uses GitHub Actions for Docker build and image push to registry