A go microservice for managing alerts and runs alongside Bitcoin SV nodes utilizing RPC
alert-system requires a supported release of Go.
To run the application, clone this repository locally and run:
export ALERT_SYSTEM_ENVIRONMENT=testnet && go run cmd/main.go
To run this application with a custom configuration file, run:
export ALERT_SYSTEM_CONFIG_FILEPATH=path/to/file/config.json && go run cmd/main.go
Configuration files can be found in the config directory.
Note: to use a custom settings file, it needs to be mounted and the appropriate environment variables set. Running it as below will run an ephemeral database but the container should sync up from the peers on the network on startup.
$ podman run -u root -e ALERT_SYSTEM_ENVIRONMENT=testnet --expose 9906 docker.io/bsvb/alert-key:latest
View the official documentation
Makefile Commands
View all makefile
commands
make help
List of all current commands:
all Runs multiple commands
clean Remove previous builds and any cached data
clean-mods Remove all the Go mod cache
coverage Shows the test coverage
diff Show the git diff
generate Runs the go generate command in the base of the repo
godocs Sync the latest tag with GoDocs
help Show this help message
install Install the application
install-go Install the application (Using Native Go)
install-releaser Install the GoReleaser application
lint Run the golangci-lint application (install if not found)
release Full production release (creates release in GitHub)
release Runs common.release then runs godocs
release-snap Test the full release (build binaries)
release-test Full production test release (everything except deploy)
replace-version Replaces the version in HTML/JS (pre-deploy)
tag Generate a new tag and push (tag version=0.0.0)
tag-remove Remove a tag if found (tag-remove version=0.0.0)
tag-update Update an existing tag to current commit (tag-update version=0.0.0)
test Runs lint and ALL tests
test-ci Runs all tests via CI (exports coverage)
test-ci-no-race Runs all tests via CI (no race) (exports coverage)
test-ci-short Runs unit tests via CI (exports coverage)
test-no-lint Runs just tests
test-short Runs vet, lint and tests (excludes integration tests)
test-unit Runs tests and outputs coverage
uninstall Uninstall the application (and remove files)
update-linter Update the golangci-lint package (macOS only)
vet Run the Go vet application
All unit tests and examples run via GitHub Actions and uses Go version 1.21.x. View the configuration file.
Run all tests (including integration tests)
make test
Run tests (excluding integration tests)
make test-short
Run the Go benchmarks:
make bench
Read more about this Go project's code standards.
View the contributing guidelines and follow the code of conduct.