Commit Graph

6 Commits

Author SHA1 Message Date
Hector
3911eca07e feat: rename output binary and archives
Update the goreleaser config to rename the output binary and archive names
to `fail2ban_exporter` instead of defaulting to the project name. This
better aligns with conventions used by other exporters.
Update Dockerfile and Makefile to follow the new naming scheme.
Update the output archives to wrap the build files in a folder. This makes
extracting the archives a little easier.

BREAKING CHANGE: Release binary name has been changed to `fail2ban_exporter`.
2022-02-20 08:46:40 +00:00
Hector
f6e328a0aa feat: correctly handle shutdown signals
Add a new method to the application startup to listen for OS shutdown
signals and handle them appropriately. A shutdown signal will cause the
app to exit immediately.
Use correct syntax for the `ENTRYPOINT` field in the Dockerfile to ensure
that OS signals get passed down to the running application.
2022-02-20 08:17:06 +00:00
Hector
0f0efe58af feat: remove startup script from docker image
Update the docker image to remove the `run.sh` script and instead run the
exporter directly. This keeps the docker image as simple as possible.
Update README file with extra info on how to collect textfile metrics in
a docker container.

BREAKING CHANGE: Using the textfile collector in docker now requires setting environment variables.
2022-02-19 14:10:36 +00:00
Hector
3c4a8f5495 build: split docker build into two images (#9)
Update the docker build file to use two images - one for building, and one
for running/deployment. This helps reduce the size of the final image.
2021-03-27 17:29:28 +00:00
Hector
b63f641bfd build: compile tool during docker build
Update the project Dockerfile to compile the tool during the docker build
instead of assuming the goreleaser tool was run previously. This allows
for custom data to be set in the compiled tool (e.g. compiled by docker)
and removes the dependency on another build step.
Update the Makefile to include a new command to build the tool for docker
which sets the version data correctly. Rename the docker commands to follow
the `docker/build-...` format to avoid confusion with the build commands.
2021-02-08 19:48:55 +00:00
Hector
9dc8dd862f build: add project dockerfile (#2)
Add a project Dockerfile to allow deploying the application in a docker
container. Add a `run.sh` script to start the application in the container.
Add Makefile commands to build the docker image based on the Dockerfile.
Fix possible nil reference error in the `db` package.
2021-02-07 13:09:02 +00:00