sudo apt -y update
sudo apt -y upgrade
sudo apt -y install cmake pkg-config libssl-dev git build-essential clang libclang-dev curl ca-certificates gnupg lsb-release
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt -y install nodejs
sudo npm install -g yarn
Check versions with
node -v
npm -v
You need node >= 17
Docker installation: https://docs.docker.com/engine/install/debian/
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
docker-compose installation: https://docs.docker.com/compose/install/
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
git clone https://github.com/randombishop/wika_etl
cd wika_etl/subql_wika
yarn install
yarn codegen
yarn build
Change the passwords Enable/disable plugins you need (see readme.md) for configuration options
Open project.yml
and fill in the starting block
dataSources:
- kind: substrate/Runtime
startBlock: {some_recent_block_here}
Let's go!
nohup sudo /usr/local/bin/docker-compose up > docker-compose.log &
sudo chown -R 1000:1000 .data/es
sudo apt-get install -y nginx
sudo vi /etc/nginx/sites-enabled/default
server {
listen 443;
server_name es-test.wika.network;
ssl_certificate /path_to_your_x509;
ssl_certificate_key /path_to_your_key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/es.access.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://localhost:5601;
proxy_read_timeout 90;
proxy_redirect http://localhost:5601 https://es-test.wika.network;
}
}
sudo sbin/service nginx restart