Skip to content

Bce 8698 gal 445 create ton docker#1

Open
lipika-pal wants to merge 32 commits intomainfrom
BCE-8698-GAL-445-Create-TON-RPCs
Open

Bce 8698 gal 445 create ton docker#1
lipika-pal wants to merge 32 commits intomainfrom
BCE-8698-GAL-445-Create-TON-RPCs

Conversation

@lipika-pal
Copy link

create ton docker

@lipika-pal lipika-pal changed the title Bce 8698 gal 445 create ton rp cs Bce 8698 gal 445 create ton docker Mar 3, 2026
Copy link

@galaxy-ggatheca galaxy-ggatheca left a comment

Choose a reason for hiding this comment

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

Still needs development to align with other x-docker repos we have, check comments.

  • Add the check-sync script or something similar to check the state of RPC
  • Public IP detect on running node
  • Labels for accessing RPC using traefik, also ports expose, except p2p port should be in another file and can be included if needed, otherwise main way of access is traefik
  • Snapshot, give examples on default.env, if possible maybe just full URL for the dump and detect the others like filename/baseurl instead of multiple variables.
  • Use aria2 to download snapshot for retry etc
  • Instead of variables like USE_TON_DUMP, just check if snapshot url is set, if yes then if also have not initialized before, then download snapshot.
  • Make sure ./ethd commands work, ie ./ethd version
  • Tested ./ethd terminate on test server, then ./ethd up, confirm it works
  • Configure like LOG_LEVEL for the node: VERBOSITY okay here
  • TON_WORK_DIR not necessary, assume a path inside container and work from that, reason, in volumes mounting - ton-work:/var/ton-work, if I change variable then my data is lost.

echo "[ton-init] Size URL: ${URL_SIZE}"
echo "[ton-init] Dump URL: ${URL_DUMP}"

DUMPSIZE="$(curl --fail --retry 5 --retry-delay 5 --silent "${URL_SIZE}" || true)"

Choose a reason for hiding this comment

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

Would you use aria2 to download instead of curl especially for retry/resume

Copy link
Author

Choose a reason for hiding this comment

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

fixed

#!/usr/bin/env bash
set -euo pipefail

: "${PUBLIC_IP:?PUBLIC_IP must be set (public IPv4) for TON node to start}"

Choose a reason for hiding this comment

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

Can you detect the public IP of the server automatically like we do on other repos. Dont need to be in .env

Copy link
Author

Choose a reason for hiding this comment

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

  • Implemented automatic IPv4 detection.
  • PUBLIC_IP environment variable remains available as manual override for edge cases where auto-detection doesn't work.

The upstream ton-docker-ctrl has PUBLIC_IP as a configuration variable: https://github.com/ton-blockchain/ton-docker-ctrl?tab=readme-ov-file#configuration

This PR enhances it by adding automatic detection, so PUBLIC_IP only needs to be set manually in special network configurations.

default.env Outdated
VALIDATOR_CONSOLE_PORT=

# ---- Init dump settings ----
USE_TON_DUMP=true

Choose a reason for hiding this comment

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

Show example of dump url, like for mainnet here as initial values

Copy link
Author

Choose a reason for hiding this comment

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

fixed

case "${__value}" in
*x.yml* )
__docompose exec x-geth x-geth version
*ton.yml* )

Choose a reason for hiding this comment

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

Not working, make sure ./ethd commands work all of them, ie ./ethd version

Copy link
Author

Choose a reason for hiding this comment

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

fixed

- /etc/localtime:/etc/localtime:ro
<<: *logging

ton:

Choose a reason for hiding this comment

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

How will ton be accessed using traefik? No labels

Copy link
Author

Choose a reason for hiding this comment

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

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants