A Quarkus application for todo management, deployed to Azure Container Apps with PostgreSQL database. Features Infrastructure as Code (IaC) with Terraform and streamlined deployment via Azure Developer CLI.
- RESTful API: Quarkus-based todo management system with full CRUD operations
- Database: Azure Database for PostgreSQL Flexible Server with Hibernate ORM Panache
- Container Orchestration: Azure Container Apps with auto-scaling capabilities
- Infrastructure as Code: Terraform modules for reproducible infrastructure
- Java 21: Modern Java runtime with Quarkus 3.18.4 framework
- Native Compilation: Support for GraalVM native image builds
- Azure Container Apps: Hosts the Quarkus application with auto-scaling
- Azure PostgreSQL Flexible Server: Managed database with automated backups
- Azure Container Registry: Private registry for Docker images
src/backend/
├── src/main/java/com/example/demo/
│ ├── TodoResource.java # REST API endpoints
│ └── Todo.java # JPA entity with Panache
├── src/main/resources/
│ └── application.properties # Quarkus configuration
├── pom.xml # Maven dependencies
└── Dockerfile # Container image definition
infra/
├── main.tf # Root Terraform module
└── modules/
├── postgresql/ # PostgreSQL Flexible Server
├── container-apps/ # Container Apps environment
├── container-registry/ # Azure Container Registry
└── resource-group/ # Resource group
Architecture Pattern: Active Record pattern with Quarkus Panache:
- API Layer (TodoResource.java) → Entity Layer (Todo.java)
This template will create infrastructure and deploy code to Azure. If you don't have an Azure Subscription, you can sign up for a free account here. Make sure you have contributor role to the Azure subscription.
- Azure Developer CLI (v1.5.0+)
- Terraform CLI (v1.5.0+)
- Azure CLI
- Docker
The fastest way to get started is using Azure Developer CLI:
# Clone the repository
git clone <repository-url>
cd quarkus-postgres-aca
# Login to Azure
azd auth login
# Provision infrastructure and deploy application
azd upThis command will:
- Prompt for environment name, subscription, and Azure region
- Create all required Azure resources via Terraform
- Build and push the Docker image to Azure Container Registry
- Deploy the container to Azure Container Apps
Once complete, you'll see the provisioned resources and the application URL:
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/todos |
Create a new todo |
| GET | /api/todos |
List all todos |
| GET | /api/todos/{id} |
Get todo by ID |
| PUT | /api/todos/{id} |
Update todo details |
| DELETE | /api/todos/{id} |
Delete a todo |
# Remove all Azure resources
azd down- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Quarkus Documentation
- Quarkus Hibernate ORM Panache
- Azure Container Apps Documentation
- Azure PostgreSQL Flexible Server
- Terraform Azure Provider
This project is licensed under the MIT License - see the LICENSE file for details.


