-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.spaceship.yml
More file actions
131 lines (125 loc) · 3.33 KB
/
docker-compose.spaceship.yml
File metadata and controls
131 lines (125 loc) · 3.33 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
version: '3.8'
services:
# Blockchain Node - Besu (Network Protocol Layer)
besu:
image: hyperledger/besu:23.10.0
container_name: tipschain-besu
ports:
- "8545:8545" # JSON-RPC HTTP
- "8546:8546" # JSON-RPC WebSocket
- "30303:30303" # P2P network
- "30303:30303/udp"
volumes:
- ./config/besu.toml:/etc/besu/besu.toml:ro
- ./config/genesis.json:/etc/besu/genesis.json:ro
- besu-data:/var/lib/besu
environment:
- OTEL_EXPORTER_OTLP_ENABLED=false
- BESU_LOGGING=INFO
command:
- --config-file=/etc/besu/besu.toml
- --genesis-file=/etc/besu/genesis.json
- --data-path=/var/lib/besu
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://localhost:8545 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
- tipschain-network
# Next.js Frontend - Wallet Service
wallet:
image: node:20-alpine
container_name: tipschain-wallet
working_dir: /app
ports:
- "3000:3000"
volumes:
- ./tipschain:/app
- /app/node_modules
- /app/.next
environment:
NODE_ENV: production
NEXT_PUBLIC_BLOCKCHAIN_RPC_URL: http://besu:8545
NEXT_PUBLIC_BLOCKCHAIN_CHAIN_ID: "19251925"
NEXT_PUBLIC_WALLET_URL: https://tipschain.sbs
NEXT_PUBLIC_DEX_URL: https://dex.tipschain.sbs
NEXT_PUBLIC_EXPLORER_URL: https://scan.tipspay.org
API_BASE_URL: https://tipschain.sbs
depends_on:
besu:
condition: service_healthy
command: >
sh -c "npm install && npm run build && npm start"
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
networks:
- tipschain-network
# Nginx Reverse Proxy - SSL/HTTPS & Load Balancing
nginx:
image: nginx:latest
container_name: tipschain-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./config/sites-enabled:/etc/nginx/sites-enabled:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
- nginx-cache:/var/cache/nginx
depends_on:
- wallet
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost"]
interval: 30s
timeout: 10s
retries: 3
networks:
- tipschain-network
# Prometheus - Metrics Collection (Optional)
prometheus:
image: prom/prometheus:latest
container_name: tipschain-prometheus
ports:
- "9090:9090"
volumes:
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
restart: unless-stopped
networks:
- tipschain-network
networks:
tipschain-network:
driver: bridge
volumes:
besu-data:
driver: local
nginx-cache:
driver: local
prometheus-data:
driver: local