-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.local-core.yaml
97 lines (92 loc) · 2.09 KB
/
docker-compose.local-core.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
volumes:
pgsql_volume:
name: pgsql_volume
services:
postgres:
image: postgres:latest
restart: always
container_name: postgres
env_file:
- ./dockerfiles/local-vrf-rr/envs/.postgres.env
expose:
- "5432"
volumes:
- pgsql_volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 5
command:
[
"bash",
"-c",
"rm -rf /var/lib/postgresql/data/* && docker-entrypoint.sh postgres",
]
redis:
image: redis:latest
container_name: redis
expose:
- "6379"
ports:
- "6380:6379"
healthcheck:
test: ["CMD-SHELL", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: dockerfiles/miko-api.Dockerfile
image: miko-api
expose:
- "3000"
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- ./dockerfiles/local-vrf-rr/envs/.api.env
healthcheck:
test:
[
"CMD",
"bash",
"-c",
"curl -s http://api:$${APP_PORT}/api/v1 | grep -q 'Orakl Network API'",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
json-rpc:
build:
context: .
dockerfile: dockerfiles/local-vrf-rr/json-rpc.Dockerfile
image: json-rpc
expose:
- "8545"
ports:
- "8545:8545"
healthcheck:
test: ["CMD", "nc", "-z", "-v", "localhost", "8545"]
interval: 15s
timeout: 3m
retries: 5
start_period: 15s
command: /bin/sh -c "npx hardhat node --no-deploy"
core-cli-contracts:
build:
context: .
dockerfile: dockerfiles/local-vrf-rr/core-cli-contracts.Dockerfile
args:
SERVICE: ${SERVICE}
image: core-cli-contracts
depends_on:
api:
condition: service_healthy
env_file: dockerfiles/local-vrf-rr/envs/.core-cli-contracts.env