Skip to content

Commit

Permalink
docs: update install/usage examples in README
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhop committed Dec 21, 2023
1 parent b5da748 commit 7c42f29
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,34 @@ Contributions are welcome! Commits should follow [conventional commits](https://
### Docker

```shell
docker run -d -p 8080:8080 ghcr.io/tjhop/ns1_exporter
docker run -d -p 8080:8080 -e NS1_APIKEY="${NS1_APIKEY}" ghcr.io/tjhop/ns1_exporter <flags>
```

### Go
With a working `go` environemnt, the `ns1_exporter` can be installed like so:

```shell
go install github.com/tjhop/ns1_exporter@latest
NS1_APIKEY="<api-token>" /path/to/ns1_exporter <flags>
```

### Binary
Download a release appropriate for your system from the [Releases](https://github.com/tjhop/ns1_exporter/releases) page.

```shell
NS1_APIKEY="<api-token>" /path/to/ns1_exporter <flags>
```

### System Packages
Download a release appropriate for your system from the [Releases](https://github.com/tjhop/ns1_exporter/releases) page.
Download a release appropriate for your system from the [Releases](https://github.com/tjhop/ns1_exporter/releases) page. A Systemd service file is included in the system packages that are built.

```shell
# install system package (example assuming Debian based)
apt install /path/to/package
# create unit override, add NS1_APIKEY environment variable and add any needed flags
systemctl edit ns1_exporter.service
systemctl enable ns1_exporter.service ; systemctl start ns1_exporter.service
```

_Note_: While packages are built for several systems, there are currently no plans to attempt to submit packages to upstream package repositories.

Expand Down

0 comments on commit 7c42f29

Please sign in to comment.