This repository provides a complete accelerator for Proof of Concept (POC) projects using RavenDB and ASP.NET Core, deployed with Azure Container Apps.
This accelerator is designed to help you quickly set up a RavenDB-backed ASP.NET Core application, ideal for POC projects. It includes:
- A sample Agenda Manager application (a simple todo app)
- Integration with RavenDB for data storage
- Deployment scripts for Azure Container Apps
Note: This accelerator is designed specifically for Proof of Concept (POC) projects and may not be suitable for production use.
Please send email if you consider to hire me.
If you like or are using this project to learn or start your solution, please give it a star. Thanks!
-
Start RavenDB using Docker:
# Create instance of RavenDB docker-compose up -d ravendb # Remove instance of RavenDB docker-compose down ravendb
-
Run the project:
dotnet run --project src/AgendaManager/AgendaManager.csproj
This will create a new database called "Productivity" and an index Agendas.
-
Install Azure Developer CLI:
Download and install
azd cli
. -
Deploy using
azd up
:Run
azd up
and follow the steps to create Azure Resources.
Resource Type | Resource Name |
---|---|
Resource Group | ${environmentName}-rg |
Log Analytics Workspace | ${abbrs.operationalInsightsWorkspaces}${resourceToken} |
Application Insights | ${abbrs.insightsComponents}${resourceToken} |
Container Registry | ${abbrs.containerRegistryRegistries}${resourceToken} |
Key Vault | ${abbrs.keyVaultVaults}${resourceToken} |
Storage Account | ${abbrs.storageStorageAccounts}${resourceToken} |
Container Apps Environment | ${abbrs.appManagedEnvironments}${resourceToken} |
RavenDB Container App | ravendb |
Agenda Manager Container App | ${abbrs.appContainerApps}agendamanage-${resourceToken} |
Navigate to Ingress section of ravendb
Azure Container App in the Azure Container Environment and:
- Select -> 'Allow traffic from IPs configured below, deny all other traffic'
- Click -> 'Add the app's outbound IP address'
- Add any other IP address in order to have access to RavenDb.
- Document Model: Provides a great development experience.
- Indexing: Allows fine-tuning of queries with indexes.
- Static Indexes: Remember to create static indexes.
- String IDs: Can be challenging to work with (see
EncryptedParameter
). - Stale Results: Not an issue in this sample.
- The RavenDB instance is a development instance with no security.
- The application assumes a single user but can be extended to support multiple users with identity management.
- Azure Container Apps Documentation
- Connect applications in Azure Container Apps: Call a container app by name
- Thanks to khalidabuhakmeh for the original inspiration.