Skip to content

Commit

Permalink
chore(deployment): changed cargo build command to --bin instead of --…
Browse files Browse the repository at this point in the history
…package, and debug mode (starkware-libs#2711)
  • Loading branch information
idan-starkware authored Dec 17, 2024
1 parent 2d78adc commit c9d984c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ tmp_venv/*
# Git hooks
/.husky
/.idea
__pycache__/
.idea/

# Python artifacts.
scripts/__pycache__
Expand Down
11 changes: 6 additions & 5 deletions deployments/images/sequencer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# syntax = devthefuture/dockerfile-x
#syntax = devthefuture/dockerfile-x

INCLUDE deployments/images/base/Dockerfile


# Compile the sequencer_node crate in release mode, ensuring dependencies are locked.
FROM base AS builder
WORKDIR /app
COPY . .
RUN cargo build --release --package starknet_sequencer_node
RUN cargo build --bin starknet_sequencer_node

FROM base AS sequencer

ENV ID=1000
WORKDIR /app
COPY --from=builder /target/release/starknet_sequencer_node /app/target/release/starknet_sequencer_node
COPY --from=builder /app/target/debug/starknet_sequencer_node ./target/debug/starknet_sequencer_node

# Copy sequencer config
COPY config/sequencer config/sequencer
COPY config/sequencer/default_config.json /app/config/sequencer/

# Create a new user "sequencer".
RUN set -ex; \
Expand All @@ -30,4 +31,4 @@ EXPOSE 8080 8081 8082
USER ${ID}

# Set the entrypoint to use tini to manage the process.
ENTRYPOINT ["tini", "--", "/app/target/release/starknet_sequencer_node"]
ENTRYPOINT ["tini", "--", "/app/target/debug/starknet_sequencer_node"]

0 comments on commit c9d984c

Please sign in to comment.