-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
77 lines (74 loc) · 2.11 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
services:
db:
build:
context: .
dockerfile: docker/db.Dockerfile
container_name: db_container
entrypoint: ["/bin/sh", "-c", "./scripts/db_start.sh"]
environment:
POSTGRES_DB: server
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- ./docker/scripts/:/scripts/
network_mode: host
expose:
- 5432
healthcheck:
test: ["CMD-SHELL", "/scripts/db_healthcheck.sh"]
interval: 1s
timeout: 10s
retries: 100
ledger:
build:
context: .
dockerfile: docker/ledger.Dockerfile
container_name: ledger_container
entrypoint: ["/bin/sh", "-c", "./scripts/ledger_start.sh"]
network_mode: host
expose:
- 1317
- 26657
healthcheck:
test: ["CMD-SHELL", "curl -f http://127.0.0.1:26657 || exit 1"]
interval: 1s
timeout: 10s
retries: 100
server:
build:
context: .
dockerfile: docker/server.Dockerfile
container_name: server_container
environment:
CSRF_SECRET: secret
CSRF_COOKIE_NAME: regen-dev.x-csrf-token
CSRF_COOKIE_SAMESITE: none
DATABASE_URL: postgres://postgres:password@localhost:5432/server
SHADOW_DATABASE_URL: postgres://postgres:postgres@localhost:5432/server_shadow
ROOT_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
entrypoint: ["/bin/sh", "-c", "./scripts/server_start.sh"]
network_mode: host
expose:
- 5000
depends_on:
db:
condition: service_healthy
ledger:
condition: service_healthy
indexer:
build:
context: .
dockerfile: docker/indexer.Dockerfile
container_name: indexer_container
environment:
DATABASE_URL: postgres://postgres:password@localhost:5432/indexer
ROOT_DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
REGEN_API: http://127.0.0.1:1317
REGEN_RPC: http://127.0.0.1:26657
entrypoint: ["/bin/sh", "-c", "./scripts/indexer_start.sh"]
network_mode: host
depends_on:
db:
condition: service_healthy
ledger:
condition: service_healthy