-
Notifications
You must be signed in to change notification settings - Fork 32
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
Set default values for TONCENTER_ENV and IMAGE_TAG #52
Conversation
* Create *.env* file with command `./configure.sh`. | ||
* Run `./configure.sh --worker` to configure TON Index worker. | ||
* Adjust parameters in *.env* file (see [list of available parameters](#available-parameters)). | ||
* Build docker images: `docker compose build postgres alembic index-api`. | ||
* Run stack: `docker compose up -d postgres alembic index-api`. | ||
* To start worker use command `docker compose up -d index-worker` after creating all services. | ||
|
||
**NOTE:** we recommend to setup indexer stack and index worker on separate servers. To install index worker to **Systemd** check this [instruction](https://github.com/kdimentionaltree/ton-index-cpp). | ||
**NOTE:** we recommend to setup indexer stack and index worker on separate servers. To install index worker to **Systemd** check this [instruction](https://github.com/toncenter/ton-indexer). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here a link to https://github.com/toncenter/ton-index-worker is required
@@ -48,6 +48,7 @@ Do the following steps to setup TON Indexer: | |||
* `TON_INDEXER_API_PORT`: a port to expose. You need check if this port is busy. Use different ports in case of multiple indexer instances on the same host. Default: `8081`. | |||
* `TON_INDEXER_TON_HTTP_API_ENDPOINT`: an endpoint to [ton-http-api](https://github.com/toncenter/ton-http-api). Indexer API contains several proxy methods to ton-http-api service: `/message`, `/runGetMethod`, `/estimateFee`, `/account`, `/wallet`. If the variable is not set these methods will not be included. Default: `<blank>` | |||
* `TON_INDEXER_WORKERS`: number of API workers. Default: `4`. | |||
* `TONCENTER_ENV`: mainnet or testnet. Default: `mainnet`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The environment variables TONCENTER_ENV, IMAGE_TAG together with a script "swarm-deploy.sh" are used to deploy in Docker Swarm mode. Sometimes the images of API and worker for mainnet and for testnet should be different.
The mistake in image in such case may cause critical issues. So, absence of default value in Compose files is the expected behavior.
Instead of specifying the default value I suggest to add these environment variables in script "configure.sh" and specify default values there.
The PR was closed because the absence of the default values is the expected behavior. |
I found some bugs in the setup process for ton-indexer. Here is a small improvement to make it easier