This repo refers to a API for alert creation for the CAS-4 project for the Context Aware System class at the University of Bologna.
You need
- Go
>= v1.23.0
- Redis
>= 7
Now you set up some env variables:
DEBUG
: if set=1
you have a more Gin debug logging lines.ADDRESS
: the url of this API.BACKEND_URL
: the url of the backend API.REDIS
: the url of the Redis server.
Fortunately the deployment is automatized by the GitHub Action cd.yml
which
pushes the latest release version to a GHCR.io package.
A new version is released using
./release.sh X.Y
Now you just exec
docker pull ghcr.io/cas-4/alertd:latest
Or you can build a new image
docker build -t alertd:latest .
docker run Redis
-e DEBUG=... \
-e ADDRESS=... \
-e BACKEND_URL=... \
-e REDIS=... \
alertd:latest
Or the Docker compose which puts up also the Redis locally.
docker compose up