Configuring State Storage via Azurite
Azurite is an emulator for azure storage.
The easiest way to use it is to install the Azurite docker image and add it to docker compose:
-
Install Azurite docker image:
- Open a command prompt and navigate to
dev/azurite/dockerfile
- Build and tag the image by running the following command:
docker build -t windows-azurite .
- Open a command prompt and navigate to
-
Configure dapr to use azurite, by copying
dev/dapr/alt-components/azurite-state.yml
todev/dapr/components
- The
accountName
andaccountKey
in the configuration are the well-known default values for azurite. See the azurite documentation for more info
- The
-
Add the azurite image to the
services
section of thedocker-compose.yml
fileazurite:
image: windows-azurite:latest
ports:
- "10000:10000" # Blob service
- "10001:10001" # Queue service
- "10002:10002" # Table service
networks:
- dcc
volumes:
- ../../DockerPersistence/Azurite:c:\azurite\persistence -
Set the
BinaryStorage
environment variable to point dapr to the azurite component:BinaryStorage=azurite-state