Skip to content

Added info run docker #611

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

Merged
merged 12 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/participate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ It is also meant to offer essential frameworks (explorers, wallets, TEPs) that a
* [Discover Node Types in TON](/participate/nodes/node-types)
* [Run your Full Node or Validator](/participate/run-nodes/full-node)
* [TON Validator maintenance & security](/participate/nodes/node-maintenance-and-security)
* [Run MyTonCtrl in Docker](/participate/run-nodes/run-docker)

## Participate in TON Web3

Expand Down
118 changes: 118 additions & 0 deletions docs/participate/run-nodes/run-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Run MyTonCtrl in Docker

## Hardware requirements:

* 16 cores CPU
* 128 GB RAM
* 1TB NVME SSD OR Provisioned 64+k IOPS storage
* 1 Gbit/s network connectivity
* public IP address (fixed IP address)
* 16 TB/month traffic on peak load

**_Not recommended!_** **_For testing purposes only!_**

Variable **IGNORE_MINIMAL_REQS=true** turns off requirements verification of CPU/RAM.

## Software requirements:

* docker-ce
* docker-ce-cli
* containerd.io
* docker-buildx-plugin
* docker-compose-plugin

_Installation guide in official [Docker](https://docs.docker.com/engine/install/)_

## Tested operational systems:

* Ubuntu 20.04
* Ubuntu 22.04
* Ubuntu 24.04
* Debian 11
* Debian 12

## Installation and start MyTonCtrl:

1. Clone the last version of the repository
```bash
git clone https://github.com/pixelplex/ton-docker-ctrl.git
```
2. Go to directory
```bash
cd ./ton-docker-ctrl
```
3. Indicate necessary values in the file .env
```bash
vi .env
```
4. Initiate assembling of docker image. There is done a compilation of the last version fift, validator-engine, lite-client, etc. Installation and initial setting of MyTonCtrl.
```bash
docker compose build ton-node
```
5. Start of MyTonCtrl
```bash
docker compose up -d
```
## Variables setting:

Variables indicated in the file .env
* **GLOBAL_CONFIG_URL** - Network configs of TON Blockchain (default: [Testnet](https://ton.org/testnet-global.config.json))
* **MYTONCTRL_VERSION** - Git branch from which MyTonCtrl assembled
* **TELEMETRY** - Enabling/Disabling telemetry
* **MODE** - Set MyTonCtrl in the indicated mode (validator or liteserver)
* **IGNORE_MINIMAL_REQS** - Ignore hardware requirements

## Stop and delete MyTonCtrl:

1. Stop container
```bash
docker compose stop
```
2. Delete container
```bash
docker compose down
```
3. Delete container with data
```bash
docker compose down --volumes
```
## Connection to MyTonCtrl:
```bash
docker compose exec -it ton-node bash -c "mytonctrl"
```
As soon as get connected it is possible to check the status by using the command `status`
```bash
MyTonCtrl> status
```
![](https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/screens/mytonctrl-status.png)

Reflects the list of accessible commands `help`
```bash
MyTonCtrl> help
```
## Review of MyTonCtrl logs:
```bash
docker compose logs
```
## Updates of MyTonCtrl and Ton:

To get the last versions of TON validator and MyTonCtrl, it is necessary to go to catalogue with docker-compose.yml and make assembling
```bash
cd ./ton-docker-ctrl
docker compose build ton-node
```
When over start docker compose again
```bash
docker compose up -d
```
When connected to MyTonCtrl an auto verification in terms of updates is done. In case any detected there is a message displayed "_MyTonCtrl update available. Please update it with `update` command._"

Update is done by means of the command update by indication of a necessary branch
```bash
MyTonCtrl> update mytonctrl2
```
## Change of data storage path:

By default Ton and Mytoncore works are stored in **/var/lib/docker/volumes/**

You can change it in the file docker-compose.yml, by indicating the required route in **volumes** section
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ const sidebars = {
//'participate/nodes/nodes-faq',
'participate/nodes/node-maintenance-and-security',
'participate/run-nodes/local-ton',
'participate/run-nodes/run-docker',
],
},
{
Expand Down
Loading