|
| 1 | +# dapr-starter |
| 2 | + |
| 3 | +This Dapr starter project accelerates the development of new Dapr services in `go`. It includes `make` commands for: |
| 4 | + |
| 5 | +* `test` - Tests the entire project |
| 6 | +* `run` - Runs the uncompiled code |
| 7 | +* `build` - Builds local release binary |
| 8 | +* `exec` - Builds binary and runs it in Dapr locally |
| 9 | +* `event` - Publishes sample message to Dapr pubsub API |
| 10 | +* `image` - Builds and publish docker image to Docker Hub |
| 11 | +* `lint` - Lints the entire project |
| 12 | +* `tag` - Creates release tag |
| 13 | +* `clean` - Cleans all runtime generated directory (bin, vendor) |
| 14 | +* `help` - Display available commands |
| 15 | + |
| 16 | +This project also includes GitHub actions in [.github/workflows](.github/workflows) that test on each `push` and build images and mark release on each `tag`. |
| 17 | + |
| 18 | +[](https://github.com/mchmarny/dapr-starter/actions?query=workflow%3ATest)  [](https://goreportcard.com/report/github.com/mchmarny/dapr-starter)  |
| 19 | + |
| 20 | +## how to use |
| 21 | + |
| 22 | +1. Start by clicking on the Use this template button above the file list |
| 23 | +2. Select the account you want to own the repository in the owner drop-down menu |
| 24 | +3. Name your repository and optionally add description |
| 25 | +4. Choose a repository visibility (Public, Internal, Public) |
| 26 | +5. Finally, click Create repository from template |
| 27 | + |
| 28 | +## make it your own |
| 29 | + |
| 30 | +After setting up the template, there is a few things you may want to change in your new project |
| 31 | + |
| 32 | +### Makefile |
| 33 | + |
| 34 | +* Change the `SERVICE_NAME` and `RELEASE_VERSION` variables |
| 35 | +* If you have not already defined the `DOCKER_USER` environment variable set it directly here |
| 36 | + |
| 37 | +### go.mod |
| 38 | + |
| 39 | +* Update line 1 in [go.mod](go.mod) file by changing the github username org name and the project name to your own (`module github.com/mchmarny/dapr-starter`) |
| 40 | +* Run `go mod tidy` and `go mod vendor` |
| 41 | +* Run `make build` to make sure everything works (check [bin](bin) folder for results) |
| 42 | + |
| 43 | +### deployment files |
| 44 | + |
| 45 | +If deploying to Kubernates you may also want to consider updating the components and deployment files in the [deploy](deploy) directory. |
| 46 | + |
| 47 | +## Disclaimer |
| 48 | + |
| 49 | +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. |
| 50 | + |
| 51 | +## License |
| 52 | + |
| 53 | +This software is released under the [MIT](./LICENSE) |
0 commit comments