diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 770e6f5..404b8ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,4 +29,12 @@ jobs: upload_url: ${{ github.event.release.upload_url }} asset_path: ./cryptowat_exporter asset_name: cryptowat_exporter_${{ github.event.release.tag_name}}_linux_amd64 - asset_content_type: application/binary \ No newline at end of file + asset_content_type: application/binary + - name: Push Docker image + id: push-docker-image + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: nbarrientos/cryptowat_exporter-linux-amd64 + tags: latest \ No newline at end of file diff --git a/README.md b/README.md index fd15ab0..e830eb4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A [Prometheus](https://prometheus.io/) exporter to fetch values from [cryptowat. ## Installation -Binaries can be downloaded from the Github releases page. A Docker image will be released soon. +Binaries can be downloaded from the Github releases page. A Docker image hosted on Dockerhub is also available. Building yourself is rather easy, just install `golang` and `make` and run: @@ -12,26 +12,41 @@ Building yourself is rather easy, just install `golang` and `make` and run: make ``` -To build a Docker image, adjust the Docker architectures in the `Makefile` and run: +To build a Docker image yourself, adjust the Docker architectures in the `Makefile` and run: ``` make docker ``` +To use the pre-built image just pull it: + +``` +docker pull nbarrientos/cryptowat_exporter-linux-amd64 +``` + ## Usage ``` ./cryptowat_exporter ``` -or with Docker: +or with Docker (self-built): ``` sudo docker run -d --name cryptowat_exporter -e "TZ=Europe/Zurich" --user yourchoice -p 9745:9745 prom/cryptowat_exporter-linux-amd64:master ``` +or pre-built: + +``` +sudo docker run -d --name cryptowat_exporter -e "TZ=Europe/Zurich" --user yourchoice -p 9745:9745 nbarrientos/cryptowat_exporter-linux-amd64 +``` + Then visit `http://localhost:9745/metrics` +Please note that publishing the exposed ports is optional. For instance if you do IPv6 global address allocation at container start time +you might not want to pass `-p` at all. + ## Configuration The exporter takes some command line parameters that allow configuring a few things: