Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add data and persistence #83

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,48 @@ The emulator is compatible with the following operations:
| List (Select Fields) | ❌ |
| List (Time-Based Access) | ❌ |
## Data
The emulator stores configuration settings in a [SQLite](https://sqlite.org) database.
The data that is generated by the emulator during a session may be persisted between sessions using a [volume](https://docs.docker.com/storage/volumes).
```yaml
services:
azure-app-configuration-emulator:
build:
context: https://github.com/tnc1997/azure-app-configuration-emulator.git
dockerfile: ./src/AzureAppConfigurationEmulator/Dockerfile
volumes:
- azure-app-configuration-emulator:/var/lib/azureappconfigurationemulator
volumes:
azure-app-configuration-emulator:
```
The connection string for the database may be overridden using the environment variable `ConnectionStrings__DefaultConnection`.

```yaml
services:
azure-app-configuration-emulator:
build:
context: https://github.com/tnc1997/azure-app-configuration-emulator.git
dockerfile: ./src/AzureAppConfigurationEmulator/Dockerfile
environment:
- ConnectionStrings__DefaultConnection=Data Source=/var/lib/azureappconfigurationemulator/emulator.db
```

The database may be seeded with data and mounted into the container however care should be taken to ensure that the database has the required schema.

```yaml
services:
azure-app-configuration-emulator:
build:
context: https://github.com/tnc1997/azure-app-configuration-emulator.git
dockerfile: ./src/AzureAppConfigurationEmulator/Dockerfile
volumes:
- ./emulator.db:/var/lib/azureappconfigurationemulator/emulator.db
```

## Messaging

The emulator integrates with Azure Event Grid to publish events using the [Event Grid event schema](https://learn.microsoft.com/en-us/azure/event-grid/custom-topics#event-grid-event-schema) when configuration settings are deleted or modified.
Expand Down
Loading