diff --git a/README.md b/README.md index 5502a72..464008c 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,19 @@ In addition to the Omnibus image (available under the `latest` tag) there are 2 - `analogj/scrutiny:collector` - Contains the Scrutiny data collector, `smartctl` binary and cron-like scheduler. You can run one collector on each server. - `analogj/scrutiny:web` - Contains the Web UI, API and Database. Only one container necessary +```bash +docker run -it --rm -p 8080:8080 \ +--name scrutiny-web \ +analogj/scrutiny:web + +docker run -it --rm \ +-v /run/udev:/run/udev:ro \ +-v /dev/disk:/dev/disk \ +-e SCRUTINY_API_ENDPOINT=http://SCRUTINY_WEB_IPADDRESS:8080 \ +--name scrutiny-collector \ +--privileged analogj/scrutiny:collector +``` + ## Usage diff --git a/collector/cmd/collector-metrics/collector-metrics.go b/collector/cmd/collector-metrics/collector-metrics.go index 135f7f0..c7f76ac 100644 --- a/collector/cmd/collector-metrics/collector-metrics.go +++ b/collector/cmd/collector-metrics/collector-metrics.go @@ -99,14 +99,16 @@ OPTIONS: Flags: []cli.Flag{ &cli.StringFlag{ - Name: "api-endpoint", - Usage: "The api server endpoint", - Value: "http://localhost:8080", + Name: "api-endpoint", + Usage: "The api server endpoint", + Value: "http://localhost:8080", + EnvVars: []string{"SCRUTINY_API_ENDPOINT"}, }, &cli.BoolFlag{ - Name: "debug", - Usage: "Enable debug logging", + Name: "debug", + Usage: "Enable debug logging", + EnvVars: []string{"DEBUG"}, }, }, }, diff --git a/collector/cmd/collector-selftest/collector-selftest.go b/collector/cmd/collector-selftest/collector-selftest.go index 63500d6..3800a5f 100644 --- a/collector/cmd/collector-selftest/collector-selftest.go +++ b/collector/cmd/collector-selftest/collector-selftest.go @@ -99,14 +99,16 @@ OPTIONS: Flags: []cli.Flag{ &cli.StringFlag{ - Name: "api-endpoint", - Usage: "The api server endpoint", - Value: "http://localhost:8080", + Name: "api-endpoint", + Usage: "The api server endpoint", + Value: "http://localhost:8080", + EnvVars: []string{"SCRUTINY_API_ENDPOINT"}, }, &cli.BoolFlag{ - Name: "debug", - Usage: "Enable debug logging", + Name: "debug", + Usage: "Enable debug logging", + EnvVars: []string{"DEBUG"}, }, }, }, diff --git a/docker/Dockerfile.web b/docker/Dockerfile.web index 5944b16..aa42cfa 100644 --- a/docker/Dockerfile.web +++ b/docker/Dockerfile.web @@ -15,7 +15,7 @@ FROM node:lts-slim as frontendbuild ENV NPM_CONFIG_LOGLEVEL=warn NG_CLI_ANALYTICS=false WORKDIR /scrutiny/src -COPY ./webapp/frontend /scrutiny/src +COPY webapp/frontend /scrutiny/src RUN npm install -g @angular/cli@9.1.4 && \ mkdir -p /scrutiny/dist && \ diff --git a/rootfs/scrutiny/jobber/jobber.yaml b/rootfs/scrutiny/jobber/jobber.yaml index 108002f..64e8b7c 100644 --- a/rootfs/scrutiny/jobber/jobber.yaml +++ b/rootfs/scrutiny/jobber/jobber.yaml @@ -19,9 +19,9 @@ resultSinks: jobs: MetricsJob: - cmd: /scrutiny/bin/scrutiny-collector-metrics run --api-endpoint ${SCRUTINY_API_ENDPOINT:-http://localhost:8080} + cmd: /scrutiny/bin/scrutiny-collector-metrics run # run daily at midnight. - time: '0 0 * * *' + time: '0 0 0 * * *' onError: Backoff notifyOnSuccess: - *filesystemSink