-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
173 lines (161 loc) · 4.27 KB
/
docker-compose.yml
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
version: '3.7'
services:
# geth-bootnode:
# hostname: geth-bootnode
# restart: always
# build: monitored-geth-client
# entrypoint: /root/start.sh
# command:
# --datadir=~/.ethereum/devchain
# --nodekeyhex="b0ac22adcad37213c7c565810a50f1772291e7b0ce53fb73e7ec2a3c75bc13b5"
# --nodiscover
# --ipcdisable
# --networkid=1214
# --netrestrict="172.16.254.0/28"
# --allow-insecure-unlock
# --http
# --http.addr="0.0.0.0"
# --http.api="eth,web3,net,admin,personal"
# --http.corsdomain="*"
# --ws
# --ws.addr="0.0.0.0"
# --ws.api="eth,web3,net,admin,personal"
# --ws.origins="*"
# --netrestrict="172.16.254.0/28"
# ports:
# - "8545:8545"
# - "8546:8546"
# - "30303:30303"
# - "30303:30303/udp"
# volumes:
# - ./nodes/monitored-geth-client/files/password:/root/files/password:ro
# - ./nodes/monitored-geth-client/files/genesis.json:/root/files/genesis.json:ro
# - ./nodes/monitored-geth-client/files/keystore:/root/.ethereum/devchain/keystore:rw
# networks:
# priv-eth-net:
# geth-miner:
# hostname: geth-miner
# build: monitored-geth-client
# restart: always
# depends_on:
# - geth-bootnode
# entrypoint: /root/start.sh
# command:
# --datadir=~/.ethereum/devchain
# --bootnodes="enode://af22c29c316ad069cf48a09a4ad5cf04a251b411e45098888d114c6dd7f489a13786620d5953738762afa13711d4ffb3b19aa5de772d8af72f851f7e9c5b164a@geth-bootnode:30303"
# --mine
# --miner.threads=1
# --networkid=1214
# --netrestrict="172.16.254.0/28"
# --miner.etherbase="0xfec114eab1feaae445bcfc355affc40d16fca62f"
# volumes:
# - ./nodes/monitored-geth-client/files/password:/root/files/password:ro
# - ./nodes/monitored-geth-client/files/genesis.json:/root/files/genesis.json:ro
# - ./nodes/monitored-geth-client/files/keystore:/root/.ethereum/devchain/keystore:rw
# networks:
# priv-eth-net:
# netstats:
# build: eth-netstats
# restart: always
# environment:
# - WS_SECRET=eth-net-stats-secret
# ports:
# - 3000:3000
# networks:
# priv-eth-net:
# net-stats:
# setup guild: https://book.getfoundry.sh/reference/anvil/#usage-within-docker
anvil:
image: ghcr.io/foundry-rs/foundry
command: anvil
environment:
ANVIL_IP_ADDR: 0.0.0.0
ports:
- 8545:8545
networks:
- anvil-network
app:
build: operator
environment:
POSTGRES_HOST: postgres
REDIS_HOST: redis
ANVIL_URL: anvil
ENV: docker
ports:
- 8000:8000
# app should allow theses network to have access
networks:
- layer2
- postgres-network
- redis-network
- anvil-network
# app need to connect db and node
depends_on:
- postgres
- redis
- anvil
restart: on-failure:3
postgres:
image: postgres:alpine
environment:
POSTGRES_DB: database-name
POSTGRES_PASSWORD: password
POSTGRES_USER: username
ports:
- 5432:5432
networks:
- postgres-network
volumes:
- ./operator/tree/schema.sql:/docker-entrypoint-initdb.d/create_tables.sql
restart: on-failure:3
pgweb:
image: sosedoff/pgweb
depends_on:
- postgres
environment:
PGWEB_DATABASE_URL: postgres://username:password@postgres:5432/database-name?sslmode=disable
ports:
- 8085:8081
networks:
- postgres-network
restart: on-failure:3
redis:
image: redis:latest
command: redis-server
volumes:
- redis:/var/lib/redis
- redis-config:/usr/local/etc/redis/redis.conf
ports:
- 6379:6379
networks:
- redis-network
redis-commander:
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOSTS=local:redis:6379
- HTTP_USER=root
- HTTP_PASSWORD=qwerty
ports:
- 8081:8081
networks:
- redis-network
depends_on:
- redis
volumes:
redis:
redis-config:
networks:
# priv-eth-net:
# driver: bridge
# ipam:
# config:
# - subnet: 172.16.254.0/28
# net-stats:
redis-network:
driver: bridge
postgres-network:
driver: bridge
layer2:
driver: bridge
anvil-network:
driver: bridge