-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
74 additions
and
2 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
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,72 @@ | ||
|
||
#FROM rust:bullseye as graph-node-build | ||
|
||
# extractor | ||
|
||
FROM lukemathwalker/cargo-chef:latest-rust-1.76-slim AS chef | ||
|
||
WORKDIR /app | ||
|
||
FROM chef AS planner | ||
COPY . . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
FROM chef AS extract_builder | ||
RUN apt update && apt install -y protobuf-compiler | ||
COPY --from=planner /app/recipe.json recipe.json | ||
RUN cargo chef cook --release --recipe-path recipe.json | ||
# Build application | ||
COPY . . | ||
RUN cargo build --release | ||
|
||
|
||
# The graph-node runtime image with only the executable | ||
FROM debian:bullseye-slim as graph-node | ||
ENV RUST_LOG "" | ||
ENV GRAPH_LOG "" | ||
ENV EARLY_LOG_CHUNK_SIZE "" | ||
|
||
ENV postgres_host "" | ||
ENV postgres_user "" | ||
ENV postgres_pass "" | ||
ENV postgres_db "" | ||
ENV postgres_args "sslmode=prefer" | ||
# The full URL to the IPFS node | ||
ENV ipfs "" | ||
# The etherum network(s) to connect to. Set this to a space-separated | ||
# list of the networks where each entry has the form NAME:URL | ||
ENV ethereum "" | ||
# The role the node should have, one of index-node, query-node, or | ||
# combined-node | ||
ENV node_role "combined-node" | ||
# The name of this node | ||
ENV node_id "default" | ||
# The ethereum network polling interval (in milliseconds) | ||
ENV ethereum_polling_interval "" | ||
|
||
# The location of an optional configuration file for graph-node, as | ||
# described in ../docs/config.md | ||
# Using a configuration file is experimental, and the file format may | ||
# change in backwards-incompatible ways | ||
ENV GRAPH_NODE_CONFIG "" | ||
|
||
# Disable core dumps; this is useful for query nodes with large caches. Set | ||
# this to anything to disable coredumps (via 'ulimit -c 0') | ||
ENV disable_core_dumps "" | ||
|
||
# HTTP port | ||
EXPOSE 8000 | ||
# WebSocket port | ||
EXPOSE 8001 | ||
# JSON-RPC port | ||
EXPOSE 8020 | ||
# Indexing status port | ||
EXPOSE 8030 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y libpq-dev ca-certificates netcat \ | ||
|
||
#COPY --from=graph-node-build /usr/local/bin/graph-node /usr/local/bin/ | ||
COPY --from=graph-node-build /app/target/release/graph-node /app/graph-node | ||
|
||
CMD ["/app/graph-node"] |
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