171 lines
4.9 KiB
YAML
Executable File
171 lines
4.9 KiB
YAML
Executable File
# Tutus Multi-Instance Setup for Bridge Testing
|
|
#
|
|
# Instance Alpha: 3 validators (test-alpha.tutus.one equivalent)
|
|
# Instance Beta: 3 validators (test-beta.tutus.one equivalent)
|
|
#
|
|
# Usage:
|
|
# docker-compose build # Build images
|
|
# docker-compose up -d # Start all 6 nodes
|
|
# docker-compose up -d alpha_one alpha_two alpha_three # Alpha only
|
|
# docker-compose up -d beta_one beta_two beta_three # Beta only
|
|
# docker-compose logs -f alpha_one # Follow logs
|
|
# docker-compose down -v # Stop and remove volumes
|
|
#
|
|
# RPC Endpoints:
|
|
# Alpha: http://localhost:10332 (node 1), :10342 (node 2), :10352 (node 3)
|
|
# Beta: http://localhost:11332 (node 1), :11342 (node 2), :11352 (node 3)
|
|
|
|
networks:
|
|
tutus_alpha:
|
|
name: tutus_alpha_network
|
|
ipam:
|
|
config:
|
|
- subnet: 172.210.0.0/24
|
|
gateway: 172.210.0.254
|
|
tutus_beta:
|
|
name: tutus_beta_network
|
|
ipam:
|
|
config:
|
|
- subnet: 172.211.0.0/24
|
|
gateway: 172.211.0.254
|
|
|
|
volumes:
|
|
alpha_one_chain:
|
|
alpha_two_chain:
|
|
alpha_three_chain:
|
|
beta_one_chain:
|
|
beta_two_chain:
|
|
beta_three_chain:
|
|
|
|
services:
|
|
# ============================================
|
|
# INSTANCE ALPHA - First Sovereign Chain
|
|
# 3 validators for dBFT consensus
|
|
# ============================================
|
|
|
|
alpha_one:
|
|
container_name: tutus_alpha_one
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
command: "node --config-file /config/protocol.tutus.alpha.one.yml --force-timestamp-logs"
|
|
volumes:
|
|
- alpha_one_chain:/chains
|
|
- ./.docker/wallets/wallet1.json:/wallet.json:ro
|
|
ports:
|
|
- "10333:10333" # P2P
|
|
- "10332:10332" # RPC
|
|
- "2112:2112" # Prometheus
|
|
networks:
|
|
tutus_alpha:
|
|
ipv4_address: 172.210.0.10
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:10332"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
alpha_two:
|
|
container_name: tutus_alpha_two
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
command: "node --config-file /config/protocol.tutus.alpha.two.yml --force-timestamp-logs"
|
|
volumes:
|
|
- alpha_two_chain:/chains
|
|
- ./.docker/wallets/wallet2.json:/wallet.json:ro
|
|
ports:
|
|
- "10343:10334" # P2P
|
|
- "10342:10332" # RPC
|
|
- "2122:2112" # Prometheus
|
|
networks:
|
|
tutus_alpha:
|
|
ipv4_address: 172.210.0.11
|
|
depends_on:
|
|
- alpha_one
|
|
|
|
alpha_three:
|
|
container_name: tutus_alpha_three
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
command: "node --config-file /config/protocol.tutus.alpha.three.yml --force-timestamp-logs"
|
|
volumes:
|
|
- alpha_three_chain:/chains
|
|
- ./.docker/wallets/wallet3.json:/wallet.json:ro
|
|
ports:
|
|
- "10353:10335" # P2P
|
|
- "10352:10332" # RPC
|
|
- "2132:2112" # Prometheus
|
|
networks:
|
|
tutus_alpha:
|
|
ipv4_address: 172.210.0.12
|
|
depends_on:
|
|
- alpha_one
|
|
|
|
# ============================================
|
|
# INSTANCE BETA - Second Sovereign Chain
|
|
# 3 validators for dBFT consensus
|
|
# Different committee from Alpha
|
|
# ============================================
|
|
|
|
beta_one:
|
|
container_name: tutus_beta_one
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
command: "node --config-file /config/protocol.tutus.beta.one.yml --force-timestamp-logs"
|
|
volumes:
|
|
- beta_one_chain:/chains
|
|
- ./.docker/wallets/wallet2.json:/wallet.json:ro
|
|
ports:
|
|
- "11333:11333" # P2P
|
|
- "11332:11332" # RPC
|
|
- "2113:2113" # Prometheus
|
|
networks:
|
|
tutus_beta:
|
|
ipv4_address: 172.211.0.10
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:11332"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
beta_two:
|
|
container_name: tutus_beta_two
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
command: "node --config-file /config/protocol.tutus.beta.two.yml --force-timestamp-logs"
|
|
volumes:
|
|
- beta_two_chain:/chains
|
|
- ./.docker/wallets/wallet3.json:/wallet.json:ro
|
|
ports:
|
|
- "11343:11334" # P2P
|
|
- "11342:11332" # RPC
|
|
- "2123:2113" # Prometheus
|
|
networks:
|
|
tutus_beta:
|
|
ipv4_address: 172.211.0.11
|
|
depends_on:
|
|
- beta_one
|
|
|
|
beta_three:
|
|
container_name: tutus_beta_three
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
command: "node --config-file /config/protocol.tutus.beta.three.yml --force-timestamp-logs"
|
|
volumes:
|
|
- beta_three_chain:/chains
|
|
- ./.docker/wallets/wallet4.json:/wallet.json:ro
|
|
ports:
|
|
- "11353:11335" # P2P
|
|
- "11352:11332" # RPC
|
|
- "2133:2113" # Prometheus
|
|
networks:
|
|
tutus_beta:
|
|
ipv4_address: 172.211.0.12
|
|
depends_on:
|
|
- beta_one
|