feat(pegboard): expose rivet server from within containers for docker compose - #2628
Closed
Conversation
This was referenced Jun 20, 2025
Member
Author
NathanFlurry
force-pushed
the
06-17-feat_pegboard_add_support_for_custom_host_entries
branch
from
June 20, 2025 19:18
0a32a7f to
f56f348
Compare
NathanFlurry
force-pushed
the
06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose
branch
from
June 20, 2025 19:18
046dd3e to
2a7b66a
Compare
NathanFlurry
marked this pull request as ready for review
June 20, 2025 19:22
Deploying rivet with
|
| Latest commit: |
eea0c38
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a648c09f.rivet.pages.dev |
| Branch Preview URL: | https://06-17-feat-pegboard-expose-r.rivet.pages.dev |
graphite-app
Bot
force-pushed
the
06-17-feat_pegboard_add_support_for_custom_host_entries
branch
from
June 20, 2025 19:40
f56f348 to
7d71cc9
Compare
graphite-app
Bot
force-pushed
the
06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose
branch
from
June 20, 2025 19:40
2a7b66a to
2b3a103
Compare
Comment on lines
+169
to
+171
| RIVET_SERVER_HOST="$(dig +short rivet-server)" | ||
| echo "Adding rule to forward $RIVET_SERVER_IPV4 to rivet-server ($RIVET_SERVER_HOST)" | ||
| add_ipt_rule "$ipt" "nat" "$NAT_CHAIN" "-d $RIVET_SERVER_IPV4 -j DNAT --to-destination $RIVET_SERVER_HOST" |
Contributor
There was a problem hiding this comment.
The DNS lookup for rivet-server lacks error handling. If the lookup fails, RIVET_SERVER_HOST will be empty, resulting in an invalid iptables rule (-j DNAT --to-destination ). Consider adding validation to ensure RIVET_SERVER_HOST contains a valid IP address before creating the rule:
RIVET_SERVER_HOST="$(dig +short rivet-server)"
if [ -z "$RIVET_SERVER_HOST" ]; then
echo "ERROR: Failed to resolve rivet-server hostname"
exit 1
fi
echo "Adding rule to forward $RIVET_SERVER_IPV4 to rivet-server ($RIVET_SERVER_HOST)"
add_ipt_rule "$ipt" "nat" "$NAT_CHAIN" "-d $RIVET_SERVER_IPV4 -j DNAT --to-destination $RIVET_SERVER_HOST"This ensures the script fails explicitly rather than creating a broken network configuration.
Suggested change
| RIVET_SERVER_HOST="$(dig +short rivet-server)" | |
| echo "Adding rule to forward $RIVET_SERVER_IPV4 to rivet-server ($RIVET_SERVER_HOST)" | |
| add_ipt_rule "$ipt" "nat" "$NAT_CHAIN" "-d $RIVET_SERVER_IPV4 -j DNAT --to-destination $RIVET_SERVER_HOST" | |
| RIVET_SERVER_HOST="$(dig +short rivet-server)" | |
| if [ -z "$RIVET_SERVER_HOST" ]; then | |
| echo "ERROR: Failed to resolve rivet-server hostname" | |
| exit 1 | |
| fi | |
| echo "Adding rule to forward $RIVET_SERVER_IPV4 to rivet-server ($RIVET_SERVER_HOST)" | |
| add_ipt_rule "$ipt" "nat" "$NAT_CHAIN" "-d $RIVET_SERVER_IPV4 -j DNAT --to-destination $RIVET_SERVER_HOST" |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
NathanFlurry
force-pushed
the
06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose
branch
from
June 20, 2025 20:34
2b3a103 to
6fe1578
Compare
NathanFlurry
force-pushed
the
06-17-feat_pegboard_add_support_for_custom_host_entries
branch
from
June 20, 2025 20:34
7d71cc9 to
38061b3
Compare
This was referenced Jun 20, 2025
This was referenced Jun 20, 2025
Deploying rivet-hub with
|
| Latest commit: |
eea0c38
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://55ee5baf.rivet-hub-7jb.pages.dev |
| Branch Preview URL: | https://06-17-feat-pegboard-expose-r.rivet-hub-7jb.pages.dev |
This was referenced Jun 21, 2025
Closed
MasterPtato
force-pushed
the
06-17-feat_pegboard_add_support_for_custom_host_entries
branch
from
June 26, 2025 01:10
38061b3 to
f07e495
Compare
MasterPtato
force-pushed
the
06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose
branch
from
June 26, 2025 01:10
6fe1578 to
8cc2d55
Compare
MasterPtato
force-pushed
the
06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose
branch
from
June 26, 2025 23:20
8cc2d55 to
eea0c38
Compare
MasterPtato
force-pushed
the
06-17-feat_pegboard_add_support_for_custom_host_entries
branch
from
June 26, 2025 23:20
f07e495 to
a130124
Compare
abcxff
force-pushed
the
06-17-feat_pegboard_add_support_for_custom_host_entries
branch
from
June 27, 2025 19:30
a130124 to
a38bee6
Compare
abcxff
force-pushed
the
06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose
branch
from
June 27, 2025 19:30
eea0c38 to
14ceb65
Compare
MasterPtato
force-pushed
the
06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose
branch
from
June 28, 2025 01:22
14ceb65 to
eea0c38
Compare
MasterPtato
force-pushed
the
06-17-feat_pegboard_add_support_for_custom_host_entries
branch
from
June 28, 2025 01:22
a38bee6 to
a130124
Compare
Contributor
Merge activity
|
graphite-app Bot
pushed a commit
that referenced
this pull request
Jun 28, 2025
… compose (#2628) <!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
graphite-app
Bot
deleted the
06-17-feat_pegboard_expose_rivet_server_from_within_containers_for_docker_compose
branch
June 28, 2025 01:51
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Changes