{"id":13409870,"url":"https://github.com/disintar/ton-k8s","last_synced_at":"2025-05-05T06:30:29.464Z","repository":{"id":65642786,"uuid":"448339507","full_name":"disintar/ton-k8s","owner":"disintar","description":"Easy to setup production ready infrastructure for TON network via compose / kubernetes","archived":false,"fork":false,"pushed_at":"2024-01-19T22:29:18.000Z","size":279,"stargazers_count":29,"open_issues_count":4,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-31T20:39:22.516Z","etag":null,"topics":["cryptocurrency","docker-compose","dton","fift","func","helm","kubernetes","ton"],"latest_commit_sha":null,"homepage":"https://disintar.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/disintar.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-15T17:03:36.000Z","updated_at":"2024-07-30T16:18:44.000Z","dependencies_parsed_at":"2024-01-19T23:33:28.165Z","dependency_job_id":null,"html_url":"https://github.com/disintar/ton-k8s","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disintar%2Fton-k8s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disintar%2Fton-k8s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disintar%2Fton-k8s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disintar%2Fton-k8s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disintar","download_url":"https://codeload.github.com/disintar/ton-k8s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252451298,"owners_count":21749912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptocurrency","docker-compose","dton","fift","func","helm","kubernetes","ton"],"created_at":"2024-07-30T20:01:03.784Z","updated_at":"2025-05-05T06:30:29.014Z","avatar_url":"https://github.com/disintar.png","language":"Python","funding_links":[],"categories":["🧑‍💻 Development","kubernetes"],"sub_categories":["Dev Tools"],"readme":"# ton-k8s\n\nDocker images, python mini-lib, helm chart for comfortable [TON](https://ton.org) infrastructure\n\n\n### Own-net locally\n\nRun:\n\n```\n./pre-build.sh \u0026\u0026 docker-compose -f ./composes/ownnet.yaml up\n```\nMore info about ownnet - [ownnet.md](ownnet.md)\n\n(you need to wait some time while network is starting)\n\nChange local validators count:\n\n```\ndeploy:\n    replicas: 3\n```\n\nIf you want to reset your private network - remove all volumes:\n\n```\ndocker-compose -f ./composes/ownnet.yaml down -v --rmi all\n```\n\n## Features\n\n| Feature name                       | Status |\n|------------------------------------|--------|\n| Full node for mainnet / testnet    | ✅      |\n| Lite-client for mainnet / testnet  | ✅      |\n| Helm chart                         | ✅      |\n| K8s secrets for keys               | ✅      |\n| Custom ton network                 | ✅      |\n| Compose                            | ✅      |\n| RPC API / ton-http-api             | ✅      |\n| Jupyter in toncenter with examples | ✅      |\n| Punisher on validator nodes        | ⌛      |\n| Status page                        | ⌛      |\n| K8s resource limits                | ⌛      |\n\n### Local build\n\nIt's one of the easiest way to start TON network locally:\n\n```\n./pre-build.sh\n```\n\n### Files\n\n`pre-build.sh` - build all docker files and send them to registry\n\n`ton-compile-source` - main Docker image, compile [TON](`https://github.com/newton-blockchain/ton/`) sources. You can\npass`is_testnet`. If `true` - compile and build `safer_overlay` branch,\nbecause [testnet is working on it](https://t.me/testnetstatus/3).\n\n`ton-full-node` - run mainnet / testnet full node, you need to pass `version` build argument `mainnet-v0`\nor `testnet-v0`\n\n## Helm / k8s\n\n1. Change registry in build_for_k8s.sh\n2. Run build_for_k8s.sh and push images to registry\n3. Change `./chart/values.yaml` to specify your needs:\n   1. Change `run` section to chose which images you want to run\n   2. Change `persistent`, add your storageClassName / create persistent\n   3. Change `imagePullSecrets` to your registry\n   4. Notice that ports in nodes used `30001-30006` nodePorts that will open in all your nodes (to get UDP traffic to local TON stuff)\n   5. Change `testnetToncenter.CONFIG` / `toncenter.CONFIG` params to your domains\n   6. Change `ingress` to correct setup of domains\n\nThen:\n\n```bash\nkubectl create namespace ton\nhelm upgrade --install --namespace ton ton ./chart/ --values ./chart/values.yaml \n```\n\n### Tips and tricks\n\nAfter publish UDP services to k8s you need to specify `externalIp` to bind public port.\n[Read more about externalIp](https://kubernetes.io/docs/concepts/services-networking/service/#external-ips)\n\n## ENVIRON\n\nFeel free to change environs in compose / helm\n\n```\nconfig = {\n    \"PUBLIC_IP\": os.getenv('PRIVATE_CONFIG', ip),\n    \"CONFIG\": os.getenv('CONFIG', 'https://test.ton.org/ton-global.config.json'),\n    \"PRIVATE_CONFIG\": os.getenv('PRIVATE_CONFIG', 'false') == 'true',\n    \"LITESERVER\": os.getenv('LITESERVER', 'true') == 'true',  # convert to bool\n    \"CONSOLE_PORT\": int(os.getenv(\"CONSOLE_PORT\", 46732)),\n    \"PUBLIC_PORT\": int(os.getenv(\"PUBLIC_PORT\", 50001)),\n    \"DHT_PORT\": int(os.getenv(\"DHT_PORT\", 6302)),\n    \"LITESERVER_PORT\": int(os.getenv(\"LITESERVER_PORT\", 43680)),\n    \"NAMESPACE\": os.getenv(\"NAMESPACE\", None),\n    \"THREADS\": int(os.getenv(\"CPU_COUNT\", cpu_count)),\n    \"GENESIS\": os.getenv(\"GENESIS\", False),\n    \"VERBOSE\": os.getenv(\"VERBOSE\", 3)\n}\n```\n\n## Donations\n\nTON: `EQCsCSLisPZ6xUtkgi_Tn5c-kipelVHRCxGdPu9x1gaVTfVC`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisintar%2Fton-k8s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisintar%2Fton-k8s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisintar%2Fton-k8s/lists"}