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

feat: Add production like docker compose for docs #813

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AshtonStephens
Copy link
Collaborator

Description

Closes: #785

Note: This is NOT meant to be run! It is solely for documentation, but is close to accurate!

This PR creates a docker compose and configuration files meant to be used solely in documentation. The primary goal is
to give those who will be running signers the right idea of what will be required. This docker compose calls upon docker
images that aren't published yet.

I fully expect us to need to make decent changes to these, but the communication aspect won't be greatly changed by
the changes we'll need to make.

I've opted to leave in some of the TODO(123) comments in the signer configuration because I think leaving them in
makes it clearer what work needs to be done and what they can expect will have changes before they deploy.

Changes

Adds three files:

docker/prodlike
├── config
│   ├── blocklist-client-config.toml
│   └── signer-config.toml
└── docker-compose.prod.yml

Testing Information

Not tested.

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@AshtonStephens AshtonStephens added the documentation Improvements or additions to documentation label Nov 11, 2024
@AshtonStephens AshtonStephens added this to the sBTC: Deposit ready milestone Nov 11, 2024
@AshtonStephens AshtonStephens self-assigned this Nov 11, 2024
@AshtonStephens AshtonStephens linked an issue Nov 11, 2024 that may be closed by this pull request
2 tasks
COPY --from=dobtc/bitcoin:25.1 /opt/bitcoin-*/bin /usr/local/bin

RUN apt-get update && apt-get install -y curl jq zstd
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little note that this doesn't reduce the final image size as it's still included in a previous layer, unless the image is built with --squash.

# !! Block Notifier Configuration
# !! ==============================================================================
# Electrum server connection confirmation.
[block_notifier]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know, I thought I had removed this a while back -- anyone know how/why it's popped back up?

- postgres
environment:
RUST_LOG: info
SIGNER_SIGNER__P2P__LISTEN_ON: tcp://0.0.0.0:4122
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need the SIGNER_ env-vars here. This was a solution in devenv to use the config file as a base, but these needed to be different for each signer instance. For this example I think everything can just be pulled from the config.

@djordon djordon self-requested a review November 12, 2024 15:07
services:

postgres:
image: postgres:15-alpine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should update this to 16.3, which is what we test against.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

[Chore]: Production docker compose
3 participants