90 lines
1.9 KiB
YAML
90 lines
1.9 KiB
YAML
services:
|
|
relay:
|
|
container_name: gsio-relay
|
|
build:
|
|
context: ./crates/gsio-relay
|
|
dockerfile: Dockerfile
|
|
args:
|
|
CERT_DOMAIN: "gsio-relay."
|
|
networks:
|
|
- gsio-network
|
|
ports:
|
|
- "3340:3340"
|
|
- "7824:7824"
|
|
|
|
# Node 1
|
|
node1:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: gsio-node1
|
|
environment:
|
|
RELAY_ADDRESS: "ws:///gsio-relay:3340"
|
|
ports:
|
|
- "3001:3000" # Map to different host ports to avoid conflicts
|
|
volumes:
|
|
- node1-data:/home/appuser/data
|
|
networks:
|
|
- gsio-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# Node 2
|
|
node2:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: gsio-node2
|
|
environment:
|
|
RELAY_ADDRESS: "ws:///gsio-relay:3340"
|
|
ports:
|
|
- "3002:3000"
|
|
volumes:
|
|
- node2-data:/home/appuser/data
|
|
networks:
|
|
- gsio-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# Node 3
|
|
node3:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: gsio-node3
|
|
environment:
|
|
RELAY_ADDRESS: "ws:///gsio-relay:3340"
|
|
ports:
|
|
- "3003:3000"
|
|
volumes:
|
|
- node3-data:/home/appuser/data
|
|
networks:
|
|
- gsio-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# Define volumes for persistent storage
|
|
volumes:
|
|
node1-data:
|
|
node2-data:
|
|
node3-data:
|
|
|
|
# Define a custom network for the nodes to communicate
|
|
networks:
|
|
gsio-network:
|
|
name: gsio-network |