-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add docker build and make targets (#19)
* chore: add docker build and make targets - add Dockerfile to build `filecoin/sentinel-visor` docker image - add .dockerignore to reduce context sent to docker build License: MIT Signed-off-by: Oli Evans <[email protected]>
- Loading branch information
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/.circleci | ||
/.github | ||
/build/* | ||
/extern/filecoin-ffi | ||
/Dockerfile* | ||
/docker-compose* | ||
/sentinel-visor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Builder | ||
FROM golang:1.15.2 as builder | ||
|
||
# Install deps for filecoin-project/filecoin-ffi | ||
RUN apt-get update | ||
RUN apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev | ||
|
||
WORKDIR /go/src/github.com/filecoin-project/sentinel-visor | ||
COPY . /go/src/github.com/filecoin-project/sentinel-visor | ||
RUN make deps && make build | ||
|
||
# Runner | ||
FROM buildpack-deps:buster-curl | ||
# Grab the things | ||
COPY --from=builder /go/src/github.com/filecoin-project/sentinel-visor/sentinel-visor /usr/bin/ | ||
COPY --from=builder /usr/lib/x86_64-linux-gnu/libOpenCL.so* /lib/ | ||
|
||
ENTRYPOINT ["/usr/bin/sentinel-visor"] | ||
CMD ["--help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,20 @@ A **Visor** process collects _permanent_ Filecoin chain meterics from a [**Lotus | |
|
||
## Getting Started | ||
|
||
Clone the repo and build the dependencies: | ||
|
||
```console | ||
$ git clone [email protected]:filecoin-project/sentinel-visor.git | ||
$ cd sentinel-visor | ||
$ make deps | ||
``` | ||
|
||
Build the `sentinel-visor` binary to the root of the project directory: | ||
|
||
```console | ||
$ make build | ||
``` | ||
|
||
### Usage | ||
|
||
``` | ||
|
@@ -16,6 +30,11 @@ A **Visor** process collects _permanent_ Filecoin chain meterics from a [**Lotus | |
Use 'sentinel-visor help <command>' to learn more about each command. | ||
``` | ||
|
||
Use the following env vars to configure the lotus node that visor reads from, and the database that it writes to: | ||
|
||
- `LOTUS_PATH` - path to the lotus data dir. _default: `~/.lotus`_ | ||
- `LOTUS_DB` - database connection . _default: `postgres://postgres:password@localhost:5432/postgres?sslmode=disable`_ | ||
|
||
### Configuring Tracing | ||
|
||
The global flag `--tracing=<bool>` turns tracing on or off. It is on by default. | ||
|