-
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
4 changed files
with
79 additions
and
16 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
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,48 @@ | ||
# Stage 1: Build dependencies | ||
FROM rust:bullseye as dependencies | ||
|
||
WORKDIR /app | ||
|
||
# Copy only the dependency manifest files | ||
COPY fuel-graph-node/Cargo.toml fuel-graph-node/Cargo.lock ./ | ||
|
||
# Build dependencies separately to leverage Docker cache | ||
RUN mkdir src && \ | ||
echo "fn main() {println!(\"dummy\")}" > src/main.rs && \ | ||
cargo build --release | ||
|
||
# Stage 2: Build the application | ||
FROM dependencies as builder | ||
|
||
# Copy the source code | ||
COPY fuel-graph-node /app/fuel-graph-node | ||
|
||
# Build the application | ||
RUN cd /app/fuel-graph-node && cargo build --release | ||
|
||
# Stage 3: Create the final image | ||
FROM debian:bullseye-slim as final | ||
|
||
# Copy the built binary from the builder stage | ||
COPY --from=builder /app/fuel-graph-node/target/release/graph-node /app/graph-node | ||
|
||
# Set environment variables and expose ports | ||
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" | ||
ENV ipfs "" | ||
ENV ethereum "" | ||
ENV node_role "combined-node" | ||
ENV node_id "default" | ||
ENV ethereum_polling_interval "" | ||
ENV GRAPH_NODE_CONFIG "" | ||
ENV disable_core_dumps "" | ||
EXPOSE 8000 8001 8020 8030 | ||
|
||
# Set the command to run the application | ||
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