dapr-starter
This Dapr starter project accelerates the development of new Dapr services in go
. It includes make
commands for:
test
- Tests the entire project
run
- Runs the uncompiled code
build
- Builds local release binary
exec
- Builds binary and runs it in Dapr locally
event
- Publishes sample message to Dapr pubsub API
image
- Builds and publish docker image to Docker Hub
lint
- Lints the entire project
tag
- Creates release tag
clean
- Cleans all runtime generated directory (bin, vendor)
help
- Display available commands
This project also includes GitHub actions in .github/workflows that test on each push
and build images and mark release on each tag
.

how to use
- Start by clicking on the Use this template button above the file list
- Select the account you want to own the repository in the owner drop-down menu
- Name your repository and optionally add description
- Choose a repository visibility (Public, Internal, Public)
- Finally, click Create repository from template
make it your own
After setting up the template, there is a few things you may want to change in your new project
Makefile
- Change the
SERVICE_NAME
and RELEASE_VERSION
variables
- If you have not already defined the
DOCKER_USER
environment variable set it directly here
go.mod
- Update line 1 in go.mod file by changing the github username org name and the project name to your own (
module github.com/mchmarny/dapr-starter
)
- Run
go mod tidy
and go mod vendor
- Run
make build
to make sure everything works (check bin folder for results)
deployment files
If deploying to Kubernates you may also want to consider updating the components and deployment files in the deploy directory.
Disclaimer
This is my personal project and it does not represent my employer. I take no responsibility for issues caused by this code. I do my best to ensure that everything works, but if something goes wrong, my apologies is all you will get.
License
This software is released under the MIT