Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ on:
- '*'
- '!main'
paths-ignore:
- .github/workflows
- '**/*.md'
- Dockerfile
pull_request:
branches: [ "*" ]
paths-ignore:
- .github/workflows
- '**/*.md'
- Dockerfile
workflow_dispatch:

env:
Expand All @@ -20,7 +26,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Build
run: cargo build --verbose
- name: Run tests
Expand Down
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM rust:bookworm AS build

# Dependencies
RUN USER=root apt-get update && apt-get upgrade -y

# Install the lastest version directly into path
RUN cargo install btcnode-metrics --root /usr/local

#####
# Final base
FROM debian:bookworm-slim

COPY --from=build /usr/local/bin/btcnode-metrics /usr/local/bin/btcnode-metrics

# copy the bin and config
RUN mkdir /etc/btcnode-metrics
COPY ./config.local.toml /etc/btcnode-metrics/config.toml

# expose the port identified in the config
EXPOSE 9898

ENV RUST_LOG=info

CMD ["/usr/local/bin/btcnode-metrics", "-c", "/etc/btcnode-metrics/config.toml"]
Loading