A production-ready Flask application with RESTful API, PostgreSQL database, and observability (Prometheus + Grafana).
- RESTful API for CRUD operations.
- PostgreSQL database with SQLAlchemy ORM.
- Structured logging with
structlog. - Prometheus metrics and Grafana dashboards.
- Dockerized for easy deployment.
-
Clone the repository:
git clone https://github.com/Barsun/exercise-axa.git cd myapp -
Set up environment variables in .env
DATABASE_URL=postgresql://user:password@db:5432/mydatabase SECRET_KEY=your_secret_key -
Start the services:
docker compose up --build
-
Access the services:
- Flask app: http://localhost:5050
-
Observability
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000
- Swagger UI: http://localhost:5050/api/docs