-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (99 loc) · 2.77 KB
/
docker-compose.yml
File metadata and controls
108 lines (99 loc) · 2.77 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
services:
locust:
networks:
- locust-net
image: locust:latest
container_name: locust
build:
context: .
env_file: .env
ports:
- 3000:3000
depends_on:
- postgres-locust
- influxdb
- telegraf
- flyway-locust
postgres-locust:
networks:
- locust-net
container_name: postgres-locust
image: postgres:15-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "${POSTGRES_PORT}:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -q -d ${POSTGRES_DB} -U ${POSTGRES_USER}" ]
interval: 10s
timeout: 5s
retries: 3
volumes:
- postgres-locust:/var/lib/postgresql/data/
flyway-locust:
networks:
- locust-net
container_name: flyway-locust
environment:
FLYWAY_USER: ${POSTGRES_USER}
FLYWAY_PASSWORD: ${POSTGRES_PASSWORD}
FLYWAY_URL: jdbc:postgresql://postgres-locust:5432/${POSTGRES_DB}
FLYWAY_SCHEMAS: public
image: flyway/flyway:latest
command: -locations=filesystem:/flyway/sql -connectRetries=60 migrate
volumes:
- ./migrations:/flyway/sql
depends_on:
- postgres-locust
influxdb:
networks:
- locust-net
image: influxdb:latest
ports:
- 8086:8086
environment:
DOCKER_INFLUXDB_INIT_MODE: ${DOCKER_INFLUXDB_INIT_MODE}
DOCKER_INFLUXDB_INIT_ORG: ${DOCKER_INFLUXDB_INIT_ORG}
DOCKER_INFLUXDB_INIT_BUCKET: ${DOCKER_INFLUXDB_INIT_BUCKET}
DOCKER_INFLUXDB_INIT_USERNAME: ${DOCKER_INFLUXDB_INIT_USERNAME}
DOCKER_INFLUXDB_INIT_PASSWORD: ${DOCKER_INFLUXDB_INIT_PASSWORD}
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${DOCKER_INFLUXDB_INIT_ADMIN_TOKEN}
INFLUXDB_DB: influx
telegraf:
networks:
- locust-net
image: telegraf:latest
hostname: ${TELEGRAFCLIENT_HOST}
ports:
- 8092:8092
volumes:
- ./.docker/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
- influxdb
environment:
DOCKER_INFLUXDB_INIT_MODE: ${DOCKER_INFLUXDB_INIT_MODE}
DOCKER_INFLUXDB_INIT_ORG: ${DOCKER_INFLUXDB_INIT_ORG}
DOCKER_INFLUXDB_INIT_BUCKET: ${DOCKER_INFLUXDB_INIT_BUCKET}
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${DOCKER_INFLUXDB_INIT_ADMIN_TOKEN}
TELEGRAFCLIENT_HOST: ${TELEGRAFCLIENT_HOST}
TELEGRAFCLIENT_PORT: ${TELEGRAFCLIENT_PORT}
INFLUXDB_DB: influx
grafana:
networks:
- locust-net
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
ports:
- 4000:3000
depends_on:
- influxdb
volumes:
- ./.docker/grafana/provisioning:/etc/grafana/provisioning
networks:
locust-net:
external: false
volumes:
postgres-locust: