-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.minimal-l2.yaml
128 lines (118 loc) · 3.63 KB
/
docker-compose.minimal-l2.yaml
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
version: "3.9"
# API Services are exposed on port 8080 on the host
# boostrap certificate fingerprint: YNo7pXthYQ9RQKv1bbpQf2R5LcLYA3ppx2BL2Hf8fIM
#
# Miner Keys:
# public: f89ef46927f506c70b6a58fd322450a936311dc6ac91f4ec3d8ef949608dbf1f
# secret: da81490c7efd5a95398a3846fa57fd17339bdf1b941d102f2d3217ad29785ff0
#
configs:
chainweb-node.common:
file: ${PWD}/config/chainweb-node.common-l2.yaml
chainweb-node.logging:
file: ./config/chainweb-node.logging.yaml
volumes:
db-server-db: {}
services:
# ########################################################################## #
# Bootstrap Node
# For a minimal config, this is the only node we need
#
bootstrap-node:
extends:
file: node-l2.yaml
service: node
labels:
com.chainweb.devnet.description: "Devnet Bootstrap Node"
com.chainweb.devnet.bootstrap-node: ""
volumes:
- ${PWD}/devnet-bootstrap-node.cert.pem:/chainweb/devnet-bootstrap-node.cert.pem:ro
- ${PWD}/devnet-bootstrap-node.key.pem:/chainweb/devnet-bootstrap-node.key.pem:ro
- ${PWD}/db:/chainweb/db
command:
- --p2p-certificate-chain-file=/chainweb/devnet-bootstrap-node.cert.pem
- --p2p-certificate-key-file=/chainweb/devnet-bootstrap-node.key.pem
- --p2p-hostname=bootstrap-node
- --bootstrap-reachability=1
- --cluster-id=devnet-minimal
# - --disable-mempool-p2p
- --p2p-max-session-count=2
- --mempool-p2p-max-session-count=2
- --known-peer-info=YNo7pXthYQ9RQKv1bbpQf2R5LcLYA3ppx2BL2Hf8fIM@bootstrap-node:1790
- --log-level=info
- --enable-mining-coordination
- --mining-public-key=${MINER_PUBLIC_KEY}
- --header-stream
- --allowReadsInLocal
- --database-directory=/chainweb/db
- --disable-pow
expose:
- "1849"
- "1790"
environment:
- DISABLE_POW_VALIDATION
l2-simulation-miner:
container_name: l2-simulation-miner
image: "${MINING_CLIENT_IMAGE}"
restart: unless-stopped
depends_on:
bootstrap-node:
condition: service_healthy
entrypoint: "/chainweb-mining-client/chainweb-mining-client"
command:
- --public-key=${MINER_PUBLIC_KEY}
- --node=bootstrap-node:1849
- --worker=constant-delay
- --constant-delay-block-time=5
- --thread-count=1
- --log-level=info
- --no-tls
ports:
- target: ${HOST_STRATUM_PORT}
published: ${HOST_STRATUM_PORT}
protocol: tcp
# ########################################################################## #
# Nginx API Proxy
api-proxy:
labels:
com.chainweb.devnet.description: "Devnet API Proxy"
com.chainweb.devnet.api-proxy: ""
depends_on:
bootstrap-node:
condition: service_healthy
image: nginx:latest
volumes:
- ${PWD}/config/nginx.api.minimal-l2.conf:/etc/nginx/conf.d/default.conf
ports:
- target: 80
published: ${HOST_SERVICE_PORT}
protocol: tcp
# ########################################################################## #
# Test Container
#
# Mounts the test sub-directory into an ubuntu container.
# The default entrypoint of the container is /bin/bash.
# The container is build from ./test/Dockerfile.
#
test:
labels:
com.chainweb.devnet.description: "Devnet Testing"
com.chainweb.devnet.debug: ""
build:
context: ./test
dockerfile: Dockerfile
image: devnet-test
volumes:
- ${PWD}/test:/test
profiles: ["test"]
pact:
labels:
com.chainweb.devnet.description: "Devnet Testing"
com.chainweb.devnet.debug: ""
build:
context: ./test
dockerfile: pact.Dockerfile
image: devnet-pact
volumes:
- ${PWD}/test:/test
profiles: ["pact"]