forked from matter-labs/block-explorer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose-00.yaml
141 lines (131 loc) · 3.48 KB
/
compose-00.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
129
130
131
132
133
134
135
136
137
138
139
140
141
name: 'double-zero-app'
services:
app:
build:
context: .
dockerfile: ./packages/app/Dockerfile
ports:
- '3010:3010'
depends_on:
- proxy
restart: unless-stopped
data-fetcher:
build:
context: .
dockerfile: ./packages/data-fetcher/Dockerfile
environment:
PORT: "3040"
LOG_LEVEL: "verbose"
BLOCKCHAIN_RPC_URL: ${TARGET_RPC}
ports:
- '3040:3040'
restart: on-failure
worker:
build:
context: .
dockerfile: ./packages/worker/Dockerfile
environment:
PORT: "3001"
LOG_LEVEL: "verbose"
DATABASE_HOST: "explorer-db"
DATABASE_USER: "postgres"
DATABASE_PASSWORD: "postgres"
DATABASE_NAME: "block-explorer"
BLOCKCHAIN_RPC_URL: ${TARGET_RPC}
DATA_FETCHER_URL: "http://data-fetcher:3040"
BATCHES_PROCESSING_POLLING_INTERVAL: "1000"
depends_on:
data-fetcher:
condition: service_started
explorer-db:
condition: service_healthy
restart: on-failure
api:
build:
context: .
dockerfile: ./packages/api/Dockerfile
environment:
PORT: "3021"
METRICS_PORT: "3005"
LOG_LEVEL: "verbose"
DATABASE_URL: "postgres://postgres:postgres@explorer-db:5432/block-explorer"
depends_on:
- worker
restart: unless-stopped
proxy:
build:
context: .
dockerfile: ./packages/proxy/Dockerfile
ports:
- "4040:4040"
environment:
SERVER_PORT: 4040
BLOCK_EXPLORER_API_URL: http://api:3021
SESSION_SECRET: "0101010101010101010101010101010101010101010101010101010101010101"
CORS_ORIGIN: ${CORS_ORIGIN_PROXY}
RPC_URL: ${TARGET_RPC}
USER_TOKEN_URL: http://private-rpc:4041/users
CREATE_TOKEN_SECRET: ${CREATE_TOKEN_SECRET}
private-rpc-migrate:
build:
context: .
dockerfile: ./packages/private-rpc/Dockerfile
command: sh -c "yarn db:migrate"
depends_on:
db-private-rpc:
condition: service_healthy
environment:
DATABASE_URL: "postgres://postgres:postgres@db-private-rpc:5432/private-rpc"
private-rpc:
build:
context: .
dockerfile: ./packages/private-rpc/Dockerfile
volumes:
- ./validium-permissions.yaml:/app/permissions.yaml
depends_on:
db-private-rpc:
condition: service_healthy
private-rpc-migrate:
condition: service_completed_successfully
ports:
- '4041:4041'
environment:
PORT: "4041"
DATABASE_URL: "postgres://postgres:postgres@db-private-rpc:5432/private-rpc"
TARGET_RPC: ${TARGET_RPC}
PERMISSIONS_YAML_PATH: "/app/permissions.yaml"
CORS_ORIGIN: ${CORS_ORIGIN_RPC}
CREATE_TOKEN_SECRET: ${CREATE_TOKEN_SECRET}
db-private-rpc:
image: "postgres:14"
logging:
driver: none
volumes:
- db-private-rpc:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=private-rpc
explorer-db:
image: "postgres:14"
logging:
driver: none
volumes:
- explorer-db:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "block-explorer"
volumes:
db-private-rpc:
explorer-db: