A complete blockchain implementation featuring: - synord: Full node with GHOSTDAG consensus - explorer-web: Modern React blockchain explorer with 3D DAG visualization - CLI wallet and tools - Smart contract SDK and example contracts (DEX, NFT, token) - WASM crypto library for browser/mobile
205 lines
5.7 KiB
YAML
205 lines
5.7 KiB
YAML
# Synor Testnet Docker Compose Configuration
|
|
# Deploys 3 seed nodes for initial testnet bootstrap
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# ==========================================================================
|
|
# Seed Node 1 (Primary Bootstrap)
|
|
# ==========================================================================
|
|
seed1:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: synor-seed1
|
|
hostname: seed1
|
|
restart: unless-stopped
|
|
command:
|
|
- "--data-dir=/data/synor"
|
|
- "--network=testnet"
|
|
- "--p2p-addr=0.0.0.0:17511"
|
|
- "--rpc-http-addr=0.0.0.0:17110"
|
|
- "--rpc-ws-addr=0.0.0.0:17111"
|
|
- "--mining-enabled"
|
|
- "--log-level=info"
|
|
ports:
|
|
- "17511:17511" # P2P
|
|
- "17110:17110" # HTTP RPC
|
|
- "17111:17111" # WebSocket RPC
|
|
volumes:
|
|
- seed1-data:/data/synor
|
|
networks:
|
|
synor-testnet:
|
|
ipv4_address: 172.20.0.10
|
|
environment:
|
|
- RUST_LOG=info
|
|
- SYNOR_NETWORK=testnet
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:17110/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
|
|
# ==========================================================================
|
|
# Seed Node 2
|
|
# ==========================================================================
|
|
seed2:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: synor-seed2
|
|
hostname: seed2
|
|
restart: unless-stopped
|
|
command:
|
|
- "--data-dir=/data/synor"
|
|
- "--network=testnet"
|
|
- "--p2p-addr=0.0.0.0:17511"
|
|
- "--rpc-http-addr=0.0.0.0:17110"
|
|
- "--rpc-ws-addr=0.0.0.0:17111"
|
|
- "--bootstrap-peers=/ip4/172.20.0.10/tcp/17511"
|
|
- "--mining-enabled"
|
|
- "--log-level=info"
|
|
ports:
|
|
- "17521:17511" # P2P (offset port)
|
|
- "17120:17110" # HTTP RPC
|
|
- "17121:17111" # WebSocket RPC
|
|
volumes:
|
|
- seed2-data:/data/synor
|
|
networks:
|
|
synor-testnet:
|
|
ipv4_address: 172.20.0.11
|
|
environment:
|
|
- RUST_LOG=info
|
|
- SYNOR_NETWORK=testnet
|
|
depends_on:
|
|
seed1:
|
|
condition: service_healthy
|
|
|
|
# ==========================================================================
|
|
# Seed Node 3
|
|
# ==========================================================================
|
|
seed3:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: synor-seed3
|
|
hostname: seed3
|
|
restart: unless-stopped
|
|
command:
|
|
- "--data-dir=/data/synor"
|
|
- "--network=testnet"
|
|
- "--p2p-addr=0.0.0.0:17511"
|
|
- "--rpc-http-addr=0.0.0.0:17110"
|
|
- "--rpc-ws-addr=0.0.0.0:17111"
|
|
- "--bootstrap-peers=/ip4/172.20.0.10/tcp/17511,/ip4/172.20.0.11/tcp/17511"
|
|
- "--mining-enabled"
|
|
- "--log-level=info"
|
|
ports:
|
|
- "17531:17511" # P2P (offset port)
|
|
- "17130:17110" # HTTP RPC
|
|
- "17131:17111" # WebSocket RPC
|
|
volumes:
|
|
- seed3-data:/data/synor
|
|
networks:
|
|
synor-testnet:
|
|
ipv4_address: 172.20.0.12
|
|
environment:
|
|
- RUST_LOG=info
|
|
- SYNOR_NETWORK=testnet
|
|
depends_on:
|
|
seed1:
|
|
condition: service_healthy
|
|
|
|
# ==========================================================================
|
|
# Testnet Faucet Service
|
|
# ==========================================================================
|
|
faucet:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.faucet
|
|
container_name: synor-faucet
|
|
hostname: faucet
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
- SYNOR_RPC_URL=http://seed1:17110
|
|
- FAUCET_AMOUNT=1000000000 # 10 SYNOR in sompi
|
|
- FAUCET_COOLDOWN=3600 # 1 hour between requests per address
|
|
- RUST_LOG=info
|
|
networks:
|
|
- synor-testnet
|
|
depends_on:
|
|
seed1:
|
|
condition: service_healthy
|
|
|
|
# ==========================================================================
|
|
# Block Explorer Backend (optional)
|
|
# ==========================================================================
|
|
explorer-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.explorer
|
|
container_name: synor-explorer-api
|
|
hostname: explorer-api
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- SYNOR_RPC_URL=http://seed1:17110
|
|
- SYNOR_WS_URL=ws://seed1:17111
|
|
- DATABASE_URL=postgres://synor:synor@postgres:5432/explorer
|
|
- RUST_LOG=info
|
|
networks:
|
|
- synor-testnet
|
|
depends_on:
|
|
seed1:
|
|
condition: service_healthy
|
|
postgres:
|
|
condition: service_healthy
|
|
profiles:
|
|
- explorer
|
|
|
|
# ==========================================================================
|
|
# PostgreSQL for Explorer
|
|
# ==========================================================================
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: synor-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=synor
|
|
- POSTGRES_PASSWORD=synor
|
|
- POSTGRES_DB=explorer
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- synor-testnet
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U synor -d explorer"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
profiles:
|
|
- explorer
|
|
|
|
# =============================================================================
|
|
# Networks
|
|
# =============================================================================
|
|
networks:
|
|
synor-testnet:
|
|
driver: bridge
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: 172.20.0.0/16
|
|
|
|
# =============================================================================
|
|
# Volumes
|
|
# =============================================================================
|
|
volumes:
|
|
seed1-data:
|
|
seed2-data:
|
|
seed3-data:
|
|
postgres-data:
|