forked from blockscout/blockscout-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
122 lines (116 loc) · 3.17 KB
/
docker-compose.dev.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
version: '3.9'
services:
db-init:
image: postgres:15
volumes:
- ./data/blockscout-db:/var/lib/postgresql/data
entrypoint:
- sh
- -c
- |
chown -R 2000:2000 /var/lib/postgresql/data
db:
depends_on:
db-init:
condition: service_completed_successfully
image: postgres:15
user: 2000:2000
shm_size: 256m
restart: always
container_name: 'db'
command: postgres -c 'max_connections=200' -c 'client_connection_check_interval=60000'
environment:
POSTGRES_DB: 'blockscout'
POSTGRES_USER: 'blockscout'
POSTGRES_PASSWORD: 'ceWb1MeLBEeOIfk65gU8EjF8'
ports:
- target: 5432
published: 7432
volumes:
- ./data/blockscout-db:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U blockscout -d blockscout" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
backend:
depends_on:
- db
image: blockscout/blockscout:6.4.0
links:
- db:database
# extra_hosts:
# - 'host.docker.internal:host-gateway'
environment:
DATABASE_URL: postgresql://blockscout:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout
ETHEREUM_JSONRPC_VARIANT: erigon
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
FIRST_BLOCK: 5660029
ECTO_USE_SSL: false
PORT: 4000
ports:
- 80:4000
command:
[
"/bin/sh",
"-c",
"bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
]
stats-db-init:
image: postgres:15
volumes:
- ./data/stats-db:/var/lib/postgresql/data
entrypoint:
- sh
- -c
- |
chown -R 2000:2000 /var/lib/postgresql/data
stats-db:
depends_on:
stats-db-init:
condition: service_completed_successfully
image: postgres:15
user: 2000:2000
shm_size: 256m
restart: always
container_name: 'stats-db'
command: postgres -c 'max_connections=200'
environment:
POSTGRES_DB: 'stats'
POSTGRES_USER: 'stats'
POSTGRES_PASSWORD: 'n0uejXPl61ci6ldCuE2gQU5Y'
ports:
- target: 5432
published: 7433
volumes:
- ./data/stats-db:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U stats -d stats" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
stats:
depends_on:
- stats-db
- backend
build: .
pull_policy: always
platform: linux/amd64
restart: always
container_name: 'stats'
# extra_hosts:
# - 'host.docker.internal:host-gateway'
environment:
- STATS__DB_URL=postgres://stats:n0uejXPl61ci6ldCuE2gQU5Y@stats-db:5432/stats
- STATS__BLOCKSCOUT_DB_URL=${STATS__BLOCKSCOUT_DB_URL:-postgresql://blockscout:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout}
- STATS__CREATE_DATABASE=true
- STATS__RUN_MIGRATIONS=true
- STATS__SERVER__HTTP__ENABLED=true
- STATS__SERVER__HTTP__ADDR=0.0.0.0:8050
- STATS__SERVER__HTTP__MAX_BODY_SIZE=2097152
- RUST_BACKTRACE=1
ports:
- 8080:8050