pyTON
Python API for libtonlibjson (Telegram Open Network Light Client).
This project is loosely based on formony ton_client
Running service
- First time:
./setup.sh
. - Replace server_name in file
infrastructure/nginx.conf
. - Set
liteserver_config
insettings.yaml
totestnet.json
ormainnet.json
. - Create file
private/mongodb_password
and put password there. - Build services:
sudo docker-compose build
. - Run services:
sudo docker-compose up -d
. - Generate certs:
- Connect to nginx container:
sudo docker exec -it pytonv3_nginx_1 /bin/bash
. - Setup certs:
certbot --nginx
. - Enter email, agree with EULA, choose DNS name.
- Restart NGINX:
sudo docker-compose restart nginx
.
- Connect to nginx container:
Get logs from nginx
- Run script
infrastructure/scripts/get_container_logs.sh <service-name-from-compose-file>
.
Update library
- (Optional) Set commit in script
infrastructure/scripts/build_tonlib.sh
(lineRUN cd /ton && git checkout <...>
). - Run script.