-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
181 lines (170 loc) · 4.08 KB
/
Copy pathcompose.yaml
File metadata and controls
181 lines (170 loc) · 4.08 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
171
172
173
174
175
176
177
178
179
180
181
services:
frontend:
image: frontend:latest
build:
context: search-services
dockerfile: Dockerfile.frontend
container_name: frontend
restart: unless-stopped
ports:
- "28090:8090"
environment:
- FRONTEND_ADDRESS=:8090
- API_ADDRESS=http://api:8080
- SEARCH_LIMIT=5
depends_on:
- api
api:
image: api:latest
build:
context: search-services
dockerfile: Dockerfile.api
container_name: api
restart: unless-stopped
ports:
- 28080:8080
volumes:
- ./search-services/api/config.yaml:/config.yaml
environment:
- API_ADDRESS=:8080
- WORDS_ADDRESS=words:8080
- UPDATE_ADDRESS=update:8080
- SEARCH_ADDRESS=search:8080
- ADMIN_USER=admin
- ADMIN_PASSWORD=password
- JWT_SECRET=XATBzy7vOmMjYssGyNJkb0ClQ+P376AHpLeI31Q1uyQ=
depends_on:
- words
- update
- search
words:
image: words:latest
build:
context: search-services
dockerfile: Dockerfile.words
container_name: words
restart: unless-stopped
ports:
- 28081:8080
volumes:
- ./search-services/words/config.yaml:/config.yaml
environment:
- WORDS_ADDRESS=:8080
update:
image: update:latest
build:
context: search-services
dockerfile: Dockerfile.update
container_name: update
restart: unless-stopped
ports:
- 28082:8080
volumes:
- ./search-services/update/config.yaml:/config.yaml
environment:
- UPDATE_ADDRESS=:8080
- DB_ADDRESS=postgres://postgres:password@postgres:5432/postgres
- XKCD_URL=https://xkcd.com
- XKCD_CONCURRENCY=10
- WORDS_ADDRESS=words:8080
- BROKER_ADDRESS=nats://nats:4222
depends_on:
postgres:
condition: service_healthy
words:
condition: service_started
nats:
condition: service_started
search:
image: search:latest
build:
context: search-services
dockerfile: Dockerfile.search
container_name: search
restart: unless-stopped
ports:
- 28083:8080
volumes:
- ./search-services/search/config.yaml:/config.yaml
environment:
- SEARCH_ADDRESS=:8080
- DB_ADDRESS=postgres://postgres:password@postgres:5432/postgres
- WORDS_ADDRESS=words:8080
- BROKER_ADDRESS=nats://nats:4222
depends_on:
postgres:
condition: service_healthy
words:
condition: service_started
nats:
condition: service_started
tests:
image: tests:latest
build: tests
container_name: tests
restart: "no"
entrypoint: "true"
postgres:
image: postgres:18
container_name: postgres
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- postgres:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin4
restart: unless-stopped
ports:
- "18888:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@test.com
PGADMIN_DEFAULT_PASSWORD: password
PGADMIN_DISABLE_POSTFIX: "true"
volumes:
- pgadmin:/var/lib/pgadmin
depends_on:
- postgres
victoriametrics:
image: victoriametrics/victoria-metrics:v1.125.0
container_name: victoriametrics
ports:
- 8428:8428
volumes:
- vmdata:/storage
- ./metrics/promscrape.yml:/etc/promscrape.yml
command:
- "--storageDataPath=/storage"
- "--httpListenAddr=:8428"
- "--promscrape.config=/etc/promscrape.yml"
restart: unless-stopped
grafana:
image: grafana/grafana:12.2.0
container_name: grafana
depends_on:
- "victoriametrics"
ports:
- 3000:3000
volumes:
- grafanadata:/var/lib/grafana
restart: unless-stopped
nats:
image: nats
container_name: nats
ports:
- "4222:4222"
volumes:
postgres:
pgadmin:
vmdata:
grafanadata: