Skip to content

Commit

Permalink
Merge branch 'mempool' into mononaut/bulk-mempool-post-api
Browse files Browse the repository at this point in the history
  • Loading branch information
junderw authored Aug 4, 2023
2 parents 96f01e6 + a21a958 commit eed22ef
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM debian:bookworm-slim AS base

RUN apt update -qy
RUN apt install -qy librocksdb-dev

FROM base as build

RUN apt install -qy git cargo clang cmake

WORKDIR /build
COPY . .

RUN cargo build --release --bin electrs

FROM base as deploy

COPY --from=build /build/target/release/electrs /bin/electrs

EXPOSE 50001

ENTRYPOINT ["/bin/electrs"]
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: '3.9'
services:

mempool-electrs:
build:
context: .
dockerfile: Dockerfile
restart: on-failure

ports:
- 50001:50001

entrypoint:
/bin/electrs
command: |
--address-search
--cookie mempool:mempool
--db-dir /electrs
--cors '*'
volumes:
- 'electrs_data:/electrs'

volumes:
electrs_data:
Empty file added electrs_data/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl Connection {
.chain_err(|| {
ErrorKind::Connection("disconnected from daemon while receiving".to_owned())
})?
.chain_err(|| "failed to read status")?;
.chain_err(|| ErrorKind::Connection("failed to read status".to_owned()))?;
let mut headers = HashMap::new();
for line in iter {
let line = line.chain_err(|| ErrorKind::Connection("failed to read".to_owned()))?;
Expand Down

0 comments on commit eed22ef

Please sign in to comment.