-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
136 lines (130 loc) · 5.87 KB
/
docker-compose.yml
File metadata and controls
136 lines (130 loc) · 5.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
services:
shogun-relay:
build:
context: .
dockerfile: Dockerfile
container_name: shogun-relay-stack
ports:
- "8765:8765" # Relay Server
- "5001:5001" # IPFS API
- "8080:8080" # IPFS Gateway
- "4001:4001" # IPFS Swarm
volumes:
# Persist IPFS data (repository, pins, blocks)
- ipfs-data:/data/ipfs
# Persist GunDB data (SQLite DB or radata files)
- relay-data:/app/relay/data
# Persist relay keys (SEA keypair for relay user)
- relay-keys:/app/keys
# Persist relay keys (SEA keypair for relay user)
# Mount logs for debugging (optional, can be removed in production)
- ./logs:/var/log/supervisor
environment:
# ============================================================================
# SERVER/RELAY IDENTITY
# ============================================================================
- NODE_ENV=production
- NODE_OPTIONS=--max-old-space-size=4096 --expose-gc
- RELAY_HOST=localhost
- RELAY_PORT=8765
- RELAY_NAME=shogun-relay
- RELAY_PATH=public
- RELAY_STORE=true
- RELAY_QR=true
- RELAY_PROTECTED=false
# ============================================================================
# AUTHENTICATION
# ============================================================================
- ADMIN_PASSWORD=shogun2025
# Relay GunDB User - REQUIRED: RELAY_SEA_KEYPAIR or RELAY_SEA_KEYPAIR_PATH
# Example: RELAY_SEA_KEYPAIR='{"pub":"...","priv":"...","epub":"...","epriv":"..."}'
# Or: RELAY_SEA_KEYPAIR_PATH=/app/keys/relay-keypair.json
# ============================================================================
# MODULE ENABLED FLAGS (true/false to enable/disable modules)
# ============================================================================
- IPFS_ENABLED=${IPFS_ENABLED:-true}
- X402_ENABLED=${X402_ENABLED:-false}
- REGISTRY_ENABLED=${REGISTRY_ENABLED:-false}
- DEALS_ENABLED=${DEALS_ENABLED:-false}
- DEAL_SYNC_ENABLED=${DEAL_SYNC_ENABLED:-false}
- WORMHOLE_ENABLED=${WORMHOLE_ENABLED:-false}
# ============================================================================
# GUNDB/STORAGE
# ============================================================================
- DATA_DIR=/app/relay/data
- DISABLE_RADISK=false
- RELAY_PEERS=
# ============================================================================
# IPFS
# ============================================================================
- IPFS_PATH=/data/ipfs
- IPFS_API_URL=http://127.0.0.1:5001
- IPFS_GATEWAY_URL=http://127.0.0.1:8080
- IPFS_API_TOKEN=shogun2025
- IPFS_API_KEY=shogun2025
# - HOLSTER_RELAY_STORAGE_PATH=/app/relay/holster-data removed
# ============================================================================
# BLOCKCHAIN/WALLET (shared key for on-chain operations)
# ============================================================================
- RELAY_PRIVATE_KEY=0x_your_private_key_here
# ============================================================================
# X402 PAYMENT
# ============================================================================
- X402_PAY_TO_ADDRESS=0xYourWalletAddressHere
- X402_PRIVATE_KEY=your_private_key_here
- X402_SETTLEMENT_MODE=direct
- X402_NETWORKS=base-sepolia,base
- X402_DEFAULT_NETWORK=base-sepolia
# Optional RPC overrides:
# - X402_BASE_SEPOLIA_RPC=https://your-rpc-url
# ============================================================================
# REGISTRY
# ============================================================================
- REGISTRY_NETWORKS=base-sepolia,base
- REGISTRY_DEFAULT_NETWORK=base-sepolia
# ============================================================================
# DEALS
# ============================================================================
- DEALS_NETWORKS=base-sepolia,base
- DEALS_DEFAULT_NETWORK=base-sepolia
# ============================================================================
# STORAGE LIMITS
# ============================================================================
- RELAY_MAX_STORAGE_GB=10
- RELAY_STORAGE_WARNING_THRESHOLD=80
# ============================================================================
# NETWORK/SECURITY
# ============================================================================
- AUTO_REPLICATION=true
- CORS_ORIGINS=https://shogun-deals.vercel.app,https://shogun-l2.vercel.app
- CORS_CREDENTIALS=true
# ============================================================================
# ============================================================================
# ============================================================================
# ============================================================================
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8765/health"]
interval: 30s
timeout: 30s
retries: 5
start_period: 180s
networks:
- shogun-network
volumes:
radata:
ipfs_staging:
ipfs_data:
# IPFS repository - contains all IPFS data (blocks, pins, config)
ipfs-data:
driver: local
# GunDB data - contains gun.db (SQLite) or radata/ directory
# This is critical for preserving subscription data, reputation, and all GunDB state
relay-data:
driver: local
# Relay keys - contains relay SEA keypair (RELAY_SEA_KEYPAIR_PATH)
relay-keys:
driver: local
networks:
shogun-network:
driver: bridge