Skip to content

Commit

Permalink
Push a Docker image to Dockerhub at release time
Browse files Browse the repository at this point in the history
  • Loading branch information
nbarrientos committed Jun 1, 2020
1 parent 3823fac commit 8b86605
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,49 @@ 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:

```
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:
Expand Down

0 comments on commit 8b86605

Please sign in to comment.