Backend of .bit sub account service, including registration and management.
- Ubuntu 18.04 or newer (2C4G)
- MYSQL >= 8.0
- Redis >= 5.0 (for cache)
- GO version >= 1.17.10
- ckb-node (Must be synced to latest height and add
Indexer
module to ckb.toml) - If the version of the dependency package is too low, please install
gcc-multilib
(apt install gcc-multilib) - Machine configuration: 4c8g200G
- das-database
- sub-account-store
# get the code
git clone https://github.com/dotbitHQ/sub-account-svr
# rename config/config.example.yaml to config/config.yaml, then edit config/config.yaml before init mysql database
mysql -uroot -p
> source sub-account-svr/tables/sub_account_db.sql;
> quit;
# compile and run
cd sub-account-svr
make sub
./sub_account --config=config/config.yaml
- docker >= 20.10
- docker-compose >= 2.2.2
copy from das-database config/config.yaml
and rename to config/config.database.yaml
and edit it
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose up -d
if you already have: mysql,redis,das-database,sub-account-store
docker run -dp 8125-8126:8125-8126 -v $PWD/config/config.yaml:/app/config/config.yaml --name sub-account-server admindid/sub-account-svr:latest
More APIs see API.md and APIApproval.md