-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
111 lines (102 loc) · 2.96 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
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
version: '3.7'
services:
prometheus:
image: bitnami/prometheus:2.47.2
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./prometheus_pyrra:/etc/prometheus/pyrra
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.enable-lifecycle'
ports:
- '9090:9090'
grafana:
image: grafana/grafana:10.2.1
environment:
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_BASIC_ENABLED=false
volumes:
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- ./grafana/dashboard.yaml:/etc/grafana/provisioning/dashboards/main.yaml
- ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/main.yaml
- ./grafana/dashboards:/var/lib/grafana/dashboards
ports:
- '3000:3000'
pyrra-api:
image: ghcr.io/pyrra-dev/pyrra:v0.7.3
command:
- api
- --prometheus-url=http://prometheus:9090
- --prometheus-external-url=http://localhost:9090
- --api-url=http://pyrra-filesystem:9444
ports:
- "9099:9099"
pyrra-filesystem:
image: ghcr.io/pyrra-dev/pyrra:v0.7.3
command:
- filesystem
- --prometheus-url=http://prometheus:9090
- --generic-rules
volumes:
- ./slos:/etc/pyrra
- ./prometheus_pyrra:/etc/prometheus/pyrra
rest-api:
hostname: rest-api
build:
context: ./rest-api
ports:
- '8080:8080'
- '9000:9000'
depends_on:
database:
condition: service_healthy
flyway:
condition: service_completed_successfully
database:
hostname: database
build:
context: ./database
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
volumes:
- ./database/1-init-db.sql:/docker-entrypoint-initdb.d/1-init-db.sql
ports:
- '5432:5432'
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
flyway:
image: flyway/flyway:10
volumes:
- ./database/migrations:/flyway/sql
command: -url=jdbc:postgresql://database:5432/fms -user=flyway -password='Flyw4y!' -connectRetries=60 migrate
database-extractor:
image: postgres:16.1
volumes:
- ./database/extractor:/scripts
- ./k6/data:/data
environment:
- PGHOST=database
- PGDATABASE=fms
- PGUSER=flyway
- PGPASSWORD=Flyw4y!
depends_on:
database:
condition: service_healthy
flyway:
condition: service_completed_successfully
command: bash -c "psql -f /scripts/extract-vehicles.sql -o /data/vehicles.csv --csv && psql -f /scripts/extract-drivers.sql -o /data/drivers.csv --csv"
k6:
image: grafana/k6:0.47.0
volumes:
- ./k6/script.js:/scripts/script.js
- ./k6/data:/scripts/data
depends_on:
database-extractor:
condition: service_completed_successfully
entrypoint: "k6 run /scripts/script.js"