-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
76 lines (68 loc) · 2.02 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
services:
explorer:
build:
context: explorer
environment:
VITE_SIMULATOR_RPC_URL: http://localhost:4000/api
VITE_CONTRACT_ADDRESS: ${VITE_CONTRACT_ADDRESS}
ports:
- 5173:5173
volumes:
- ./explorer/src:/app/src # Warning: if you modify something in another place (public folder or index.html for example), you need to restart the container
depends_on:
seed:
condition: service_completed_successfully
seed:
build:
context: .
dockerfile: Dockerfile.seed
volumes:
- ./.env:/app/.env
environment:
RPCPROTOCOL: http
RPCHOST: jsonrpc
RPCPORT: ${RPCPORT}
depends_on:
jsonrpc:
condition: service_healthy
# Simulator components
postgres:
image: postgres:16-alpine
volumes:
- .simulator-postgres:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: genlayer_state
healthcheck:
test: pg_isready -U postgres -d postgres
interval: 10s
timeout: 3s
retries: 3
jsonrpc:
image: yeagerai/simulator-jsonrpc:v0.16.0-test000 # TODO: migrate to "production" tag
volumes:
- ./.env.simulator:/app/.env
- ./jsonrpc/healthcheck.py:/healthcheck.py
environment:
FLASK_SERVER_PORT: ${RPCPORT}
# DISABLE_INFO_LOGS_ENDPOINTS: '["get_transaction_by_id","get_contract_schema_for_code","get_contract_schema", "ping"]'
DISABLE_INFO_LOGS_ENDPOINTS: '["ping"]'
OPENAIKEY: ${OPENAIKEY}
depends_on:
database-migration:
condition: service_completed_successfully
ports:
- ${RPCPORT}:${RPCPORT}
restart: always
database-migration:
image: yeagerai/simulator-database-migration:v0.16.0-test000 # TODO: migrate to "production" tag
environment:
- DB_URL=postgresql://postgres:postgres@postgres/genlayer_state
volumes:
- ./.env.simulator:/app/.env
depends_on:
postgres:
condition: service_healthy