-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (59 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
65 lines (59 loc) · 1.42 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
services:
db:
image: postgres:16
container_name: avito-pr-postgres
environment:
POSTGRES_USER: avito
POSTGRES_PASSWORD: avito
POSTGRES_DB: pr_service
ports:
- "5555:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U avito -d pr_service" ]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
restart: unless-stopped
migrator:
image: migrate/migrate
container_name: avito-pr-migrator
depends_on:
db:
condition: service_healthy
volumes:
- ./migrations:/migrations
# migrate up и выход
command:
[
"-path", "/migrations",
"-database", "postgres://avito:avito@db:5432/pr_service?sslmode=disable",
"up"
]
restart: "no"
pr-reviewer-service:
build: .
container_name: avito-pr-service
ports:
- "8080:8080"
environment:
DB_DSN: "postgres://avito:avito@db:5432/pr_service?sslmode=disable"
depends_on:
db:
condition: service_started
migrator:
condition: service_completed_successfully
k6:
image: grafana/k6
depends_on:
pr-reviewer-service:
condition: service_started
environment:
BASE_URL: "http://pr-reviewer-service:8080"
volumes:
- ./loadtest:/scripts
command: [ "run", "/scripts/k6_pr_service.js" ]
volumes:
pgdata: