-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
170 lines (159 loc) · 4.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
170 lines (159 loc) · 4.3 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
version: "3.8"
# Profiles let you run just the data layer (the historical default — start
# infra, then `pnpm dev` on the host) or the fully containerized stack.
#
# docker compose up -d # postgres + redis only
# docker compose --profile full up -d --build # postgres + redis + api + indexer + all workers
# docker compose --profile app up -d --build # postgres + redis + every process (alias for full)
# docker compose --profile api up -d --build # postgres + redis + api only
#
# See docs/docker-compose.md for the full walkthrough.
services:
postgres:
image: postgres:16-alpine
container_name: vatix-postgres
stop_signal: SIGTERM
stop_grace_period: 30s
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: vatix
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
container_name: vatix-redis
stop_signal: SIGTERM
stop_grace_period: 10s
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: .
target: api
container_name: vatix-backend
profiles: ["app", "full", "api"]
env_file:
- .env
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/vatix
REDIS_URL: redis://redis:6379
ports:
- "${PORT:-3000}:${PORT:-3000}"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
indexer:
build:
context: .
target: indexer
container_name: vatix-indexer
profiles: ["app", "full", "indexer"]
env_file:
- .env
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/vatix
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
oracle:
build:
context: .
target: oracle
container_name: vatix-oracle
profiles: ["app", "oracle"]
env_file:
- .env
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/vatix
REDIS_URL: redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
finalization-worker:
build:
context: .
target: finalization-worker
container_name: vatix-finalization-worker
profiles: ["app", "full", "workers", "finalization-worker"]
env_file:
- .env
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/vatix
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
oracle-worker:
build:
context: .
target: oracle-worker
container_name: vatix-oracle-worker
profiles: ["app", "full", "workers", "oracle-worker"]
env_file:
- .env
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/vatix
REDIS_URL: redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
settlement-worker:
build:
context: .
target: settlement-worker
container_name: vatix-settlement-worker
profiles: ["app", "full", "workers", "settlement-worker"]
env_file:
- .env
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/vatix
REDIS_URL: redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
# One-off migration runner — not part of any long-running profile.
# Usage: docker compose --profile tools run --rm migrate
migrate:
build:
context: .
target: migrate
container_name: vatix-migrate
profiles: ["tools", "migrate"]
env_file:
- .env
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/vatix
depends_on:
postgres:
condition: service_healthy
volumes:
postgres_data:
redis_data: