-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
173 lines (165 loc) · 5.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
173 lines (165 loc) · 5.2 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Chain data uses a named volume so Geth can create geth.ipc (Unix socket). Bind-mounting
# ./execution from WSL /mnt/c/... fails with "bind: operation not supported" for IPC.
# Volume name includes NETWORK so testnet and mainnet data stay separate on the same host.
volumes:
execution-data:
name: coti-${NETWORK:-testnet}-execution-data
services:
# Sets up the genesis configuration for the go-ethereum client from a JSON file.
coti-full-node-genesis:
image: coti/${NETWORK:-testnet}-full-node:${DOCKER_FULL_NODE_IMAGE_VERSION:-1.2.0}
container_name: coti-${NETWORK:-testnet}-full-node-genesis
command: --datadir=/execution init /coti-genesis/genesis.json
volumes:
- execution-data:/execution
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
coti-full-node:
image: coti/${NETWORK:-testnet}-full-node:${DOCKER_FULL_NODE_IMAGE_VERSION:-1.2.0}
container_name: coti-${NETWORK:-testnet}-full-node
command:
- --soda.engine
- --soda.seqaddr=${COTI_SODA_SEQADDR}
- --soda.exec1addr=${COTI_SODA_EXEC1ADDR}
- --soda.exec2addr=${COTI_SODA_EXEC2ADDR}
- --soda.validator
- --networkid=${COTI_NETWORK_ID}
- --http
- --http.api=eth,net,web3,txpool
- --http.corsdomain=*
- --http.vhosts=*
- --http.addr=0.0.0.0
- --http.port=8545
- --port=7400
- --identity=${FULLNODE_FQDN}
- --verbosity=3
- --datadir=/execution
- --syncmode=full
- --ws
- --ws.port=8546
- --ws.addr=0.0.0.0
- --ws.origins=*
- --ws.api=web3,eth
- --metrics
- --metrics.expensive
- --metrics.addr=0.0.0.0
- --rpc.allow-unprotected-txs=true
- --miner.gasprice=5000000
- --bootnodes=${COTI_BOOTNODES}
- --nat=extip:${FULLNODE_EXT_IP}
ports:
- "8545:8545"
- 8546:8546
- 7400:7400
- 7400:7400/udp
depends_on:
coti-full-node-genesis:
condition: service_completed_successfully
volumes:
- execution-data:/execution
- ./nodekey:/execution/geth/nodekey
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "5"
# Local-only status page for operators (open http://127.0.0.1:8090 on the host).
coti-operator-dashboard:
build:
context: ./operator-dashboard
container_name: coti-${NETWORK:-testnet}-operator-dashboard
restart: unless-stopped
depends_on:
coti-full-node:
condition: service_started
ports:
- "127.0.0.1:8090:8090"
environment:
LISTEN_PORT: "8090"
NETWORK: ${NETWORK:-testnet}
RPC_URL: http://coti-full-node:8545
FULLNODE_FQDN: ${FULLNODE_FQDN:-}
FULLNODE_EXT_IP: ${FULLNODE_EXT_IP:-}
NGINX_ENABLED: ${NGINX_ENABLED:-false}
FRPC_ENABLED: ${FRPC_ENABLED:-false}
FRPC_CUSTOM_DOMAIN: ${FRPC_CUSTOM_DOMAIN:-}
FRPS_SERVER_ADDR: ${FRPS_SERVER_ADDR:-}
FRPS_SERVER_ADDR_1: ${FRPS_SERVER_ADDR_1:-}
FRPS_SERVER_ADDR_2: ${FRPS_SERVER_ADDR_2:-}
FRPS_SERVER_PORT: ${FRPS_SERVER_PORT:-7000}
# Internal HTTP gateway for FRPC: strips /rpc and /ws before forwarding to the node (no TLS).
nginx-frpc-gateway:
image: nginx:1.15-alpine
container_name: coti-${NETWORK:-testnet}-nginx-frpc-gateway
restart: unless-stopped
profiles:
- frpc
depends_on:
coti-full-node:
condition: service_started
coti-operator-dashboard:
condition: service_started
volumes:
- ./nginx/frpc-gateway.conf:/etc/nginx/conf.d/default.conf:ro
frpc-1:
image: fatedier/frpc:v0.61.2
container_name: coti-${NETWORK:-testnet}-frpc-1
restart: unless-stopped
profiles:
- frpc
depends_on:
nginx-frpc-gateway:
condition: service_started
command:
- -c
- /etc/frp/frpc.toml
volumes:
- ./frpc-1.toml:/etc/frp/frpc.toml:ro
frpc-2:
image: fatedier/frpc:v0.61.2
container_name: coti-${NETWORK:-testnet}-frpc-2
restart: unless-stopped
profiles:
- frpc
depends_on:
nginx-frpc-gateway:
condition: service_started
command:
- -c
- /etc/frp/frpc.toml
volumes:
- ./frpc-2.toml:/etc/frp/frpc.toml:ro
# Temporary Nginx for SSL setup only (Certbot ACME challenge). Use: docker compose --profile setup up -d nginx-init
nginx-init:
image: nginx:1.15-alpine
container_name: nginx-init
profiles:
- setup
ports:
- "80:80"
volumes:
- ./nginx/certbot:/var/www/certbot
- ./nginx/nginx-init_default.conf:/etc/nginx/conf.d/default.conf
nginx:
image: nginx:1.15-alpine
container_name: nginx
profiles:
- proxy-nginx
depends_on:
coti-full-node:
condition: service_started
coti-operator-dashboard:
condition: service_started
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/sites-enabled:/etc/nginx/sites-enabled
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/certbot:/var/www/certbot
- /etc/letsencrypt:/etc/letsencrypt:ro
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"