Skip to content

Commit

Permalink
Merge branch 'main' into issue4894
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Oct 3, 2022
2 parents ef6f723 + f71bb74 commit 21ce4b7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
1 change: 0 additions & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ autolabeler:
- 'CHANGELOG.md'
- 'zebra-consensus/src/checkpoint/*-checkpoints.txt'
# Developer-only changes
- 'zebra-utils'
- '.gitignore'
# Test-only changes
- 'zebra-test'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/continous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
steps:
- name: Getting Zebrad Version
id: get
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
result-encoding: string
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
if: ${{ needs.changed-files.outputs.workflows == 'true' }}
steps:
- uses: actions/[email protected]
- uses: reviewdog/action-actionlint@v1.31.0
- uses: reviewdog/action-actionlint@v1.32.0
with:
level: warning
fail_on_error: false
Expand Down
32 changes: 20 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ COPY ./docker/entrypoint.sh /
RUN chmod u+x /entrypoint.sh

# By default, runs the entrypoint tests specified by the environmental variables (if any are set)
ENTRYPOINT ["/entrypoint.sh"]
CMD [ "cargo"]
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "cargo" ]

# In this stage we build a release (generate the zebrad binary)
#
Expand Down Expand Up @@ -148,27 +148,35 @@ ENV ZEBRA_CONF_FILE ${ZEBRA_CONF_FILE}

# Build the `zebrad.toml` before starting the container, using the arguments from build
# time, or using the default values set just above. And create the conf path and file if
# it does not exist
# it does not exist.
#
# TODO: move this file creation to an entrypoint as we can use default values at runtime,
# and modify those as needed when starting the container (at runtime and not at build time)
# It is safe to use multiple RPC threads in Docker, because we know we are the only running
# `zebrad` or `zcashd` process in the container.
#
# TODO:
# - move this file creation to an entrypoint as we can use default values at runtime,
# and modify those as needed when starting the container (at runtime and not at build time)
# - make `cache_dir`, `rpc.listen_addr`, `metrics.endpoint_addr`, and `tracing.endpoint_addr` into Docker arguments
RUN mkdir -p ${ZEBRA_CONF_PATH} \
&& touch ${ZEBRA_CONF_PATH}/${ZEBRA_CONF_FILE}
RUN set -ex; \
{ \
echo "[consensus]"; \
echo "checkpoint_sync = ${CHECKPOINT_SYNC}"; \
echo "[metrics]"; \
echo "endpoint_addr = '0.0.0.0:9999'"; \
echo "[network]"; \
echo "network = '${NETWORK}'"; \
echo "[consensus]"; \
echo "checkpoint_sync = ${CHECKPOINT_SYNC}"; \
echo "[state]"; \
echo "cache_dir = '/zebrad-cache'"; \
echo "[rpc]"; \
echo "listen_addr = None"; \
echo "parallel_cpu_threads = 0"; \
echo "[metrics]"; \
echo "endpoint_addr = None"; \
echo "[tracing]"; \
echo "endpoint_addr = '0.0.0.0:3000'"; \
echo "endpoint_addr = None"; \
} > "${ZEBRA_CONF_PATH}/${ZEBRA_CONF_FILE}"

EXPOSE 3000 8233 18233
EXPOSE 8233 18233

ARG SHORT_SHA
ENV SHORT_SHA $SHORT_SHA
Expand All @@ -177,4 +185,4 @@ ARG SENTRY_DSN
ENV SENTRY_DSN ${SENTRY_DSN}

# TODO: remove the specified config file location and use the default expected by zebrad
CMD [ "zebrad", "-c", "${ZEBRA_CONF_PATH}/${ZEBRA_CONF_FILE}", "start" ]
CMD zebrad -c "${ZEBRA_CONF_PATH}/${ZEBRA_CONF_FILE}" start

0 comments on commit 21ce4b7

Please sign in to comment.