forked from OilerNetwork/fossil-headers-db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (42 loc) · 1.13 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
services:
update:
build:
dockerfile: Dockerfile.update
context: .
ports:
- 8080:8080
environment:
- DB_CONNECTION_STRING=postgres://postgres:postgres@db:5432/postgres
- NODE_CONNECTION_STRING=127.0.0.1:8545 # This should be an actual rpc url
- ROUTER_ENDPOINT=0.0.0.0:8080
depends_on:
db:
condition: service_healthy
# Commenting this out as in the beginning this should not run in parallel with
# the update script
# fix:
# build:
# dockerfile: Dockerfile.fix
# context: .
# ports:
# - 8080:8081
# environment:
# - DB_CONNECTION_STRING=postgres://postgres:postgres@db:5432/postgres
# - NODE_CONNECTION_STRING=127.0.0.1:8545
# - ROUTER_ENDPOINT=0.0.0.0:8080
# depends_on:
# update:
# condition: service_started
db:
image: postgres:16-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5