Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): allow a custom zebrad config file path #5163

Merged
merged 2 commits into from
Sep 15, 2022
Merged
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
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ RUN apt-get update && \
ARG CHECKPOINT_SYNC=true
ARG NETWORK=Mainnet

ARG ZEBRA_CONF_PATH=/etc/zebra/zebrad.toml
ENV ZEBRA_CONF_PATH ${ZEBRA_CONF_PATH}
gustavovalverde marked this conversation as resolved.
Show resolved Hide resolved

# Build the `zebrad.toml` before starting the container, using the arguments from build
# time, or using the default values set just above.
RUN set -ex; \
Expand All @@ -153,7 +156,7 @@ RUN set -ex; \
echo "cache_dir = '/zebrad-cache'"; \
echo "[tracing]"; \
echo "endpoint_addr = '0.0.0.0:3000'"; \
} > "zebrad.toml"
} > "${ZEBRA_CONF_PATH}"
teor2345 marked this conversation as resolved.
Show resolved Hide resolved

EXPOSE 3000 8233 18233

Expand All @@ -163,4 +166,4 @@ ENV SHORT_SHA $SHORT_SHA
ARG SENTRY_DSN
ENV SENTRY_DSN ${SENTRY_DSN}

CMD [ "zebrad", "-c", "zebrad.toml", "start" ]
CMD [ "zebrad", "-c", "${ZEBRA_CONF_PATH}", "start" ]