Mainsail API
954
Welcome to the home of Mainsail, a highly modular, TypeScript-based, layer 1 blockchain protocol. Mainsail is the next evolution of the 'ARK Core' blockchain protocol and features a new consensus engine that greatly improves the finality, security, and reliability of our blockchain solution.
Learn more about Mainsail API on the official GitHub repository https://github.com/ArkEcosystem/mainsail
Run API node using Docker Compose
TestNet
Make sure you have set
API=truein your Mainsail Coretestnet.envfile! If you haven't, please stop and remove any previous Mainsail Core deployments. Deploy Mainsail Core from scratch after settingAPI=true.
mkdir -p ~/mainsail-docker/api
cd ~/mainsail-docker/api
Create docker network:
docker network create core
Create file
docker-compose.ymlwith the following content:
services:
postgres:
image: "postgres:alpine"
container_name: postgres-api
restart: always
volumes:
- 'postgres:/var/lib/postgresql/data'
networks:
- core
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: api_testnet
POSTGRES_USER: node
api:
image: arkecosystem/mainsail-api:testnet
container_name: mainsail-api-testnet
restart: always
ports:
- "4003:4003"
cap_add:
- SYS_NICE
- SYS_RESOURCE
- SYS_TIME
volumes:
- ~/.config/mainsail:/home/node/.config/mainsail
- ~/.local/share/mainsail:/home/node/.local/share/mainsail
- ~/.local/state/mainsail:/home/node/.local/state/mainsail
- /etc/localtime:/etc/localtime:ro
networks:
- core
env_file: ./testnet.env
tty: true
links:
- postgres
depends_on:
- postgres
volumes:
postgres:
api:
networks:
core:
external: true
Create file
testnet.envwith the following content:
TOKEN=ark
NETWORK=testnet
CORE_LOG_LEVEL=debug
CORE_LOG_LEVEL_FILE=debug
CORE_DB_HOST=postgres-api
CORE_DB_PORT=5432
CORE_DB_DATABASE=api_testnet
CORE_DB_USERNAME=node
CORE_DB_PASSWORD=password
CORE_DB_LOGGING_ENABLED=true
Start:
docker-compose up -d
Monitor:
docker logs --tail 50 mainsail-api-testnet -f
Stop and remove:
docker-compose down -v --rmi all
Content type
Image
Digest
sha256:e7871a543…
Size
118.9 MB
Last updated
18 days ago
docker pull arkecosystem/mainsail-api:testnet