-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
105 lines (100 loc) · 2.62 KB
/
docker-compose.yaml
File metadata and controls
105 lines (100 loc) · 2.62 KB
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
version: "3.9"
services:
postgres-db:
profiles: [ "server" ]
container_name: postgres-db
image: postgres:15.2-alpine
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_DB: postgres
POSTGRES_USER: app_user
POSTGRES_PASSWORD: app_password
volumes:
- "./docker/data/pgdata:/var/lib/postgresql/data"
- "./migrations/init.sql:/docker-entrypoint-initdb.d/init.sql"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U app_user -d postgres" ]
interval: 5s
timeout: 15s
retries: 5
postgrest-server:
profiles: [ "server" ]
container_name: postgrest-server
image: postgrest/postgrest
restart: always
ports:
- "3001:3001"
environment:
PGRST_DB_URI: postgres://app_user:app_password@postgres-db:5432/postgres
PGRST_DB_SCHEMA: public
PGRST_DB_ANON_ROLE: app_user
PGRST_SERVER_PORT: 3001
PGRST_OPENAPI_SERVER_PROXY_URI: "http://127.0.0.1:3001"
depends_on:
- postgres-db
prefect-server:
profiles: [ "server" ]
container_name: prefect-server
image: prefecthq/prefect:2.10.15-python3.11
restart: always
volumes:
- "./docker/data/prefect:/root/.prefect"
entrypoint:
[
"/opt/prefect/entrypoint.sh",
"prefect",
"server",
"start"
]
environment:
- PREFECT_UI_URL=http://127.0.0.0:4200/api
- PREFECT_API_URL=http://127.0.0.1:4200/api
- PREFECT_SERVER_API_HOST=0.0.0.0
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://app_user:app_password@postgres-db:5432/postgres
ports:
- 4200:4200
depends_on:
- postgres-db
prefect-agent:
profiles: [ "server" ]
container_name: prefect-agent
image: tx-event-indexer/prefect-agent
restart: always
build:
context: .
dockerfile: Dockerfile
env_file:
- ".env"
environment:
- PREFECT_API_URL=http://prefect-server:4200/api
- POSTGREST_URL=http://postgrest-server:3001
volumes:
- "./flows:/opt/prefect/flows"
depends_on:
- prefect-server
- postgres-db
- postgrest-server
client:
profiles: [ "server" ]
container_name: client
image: tx-event-indexer/client
build:
context: client/
dockerfile: Dockerfile
args:
NODE_ENV: production
BINANCE_API_URL: https://api.binance.com/
INDEXER_API_URL: http://127.0.0.1:3001/
restart: always
ports:
- 8080:3000
depends_on:
- prefect-server
- postgres-db
- postgrest-server
- prefect-agent
networks:
default:
name: tx-indexer-network