-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (81 loc) · 2.12 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
version: '3.4'
services:
kotlincrud-postgres:
container_name: kotlincrud-postgres
image: kotlincrud-postgres:latest
build:
dockerfile: Dockerfile
context: ./../
environment:
- APP_DATABASE_HOST=postgres
- APP_DATABASE_PORT=5432
- APP_DATABASE_NAME=kotlin_crud
- APP_DATABASE_SCHEMA=kotlin_crud
- APP_DATABASE_USERNAME=postgres
- APP_DATABASE_PASSWORD=blue-elephant
- USERS_API_IMPL=mockoon
- USERS_API_MOCKOON_URL=http://mockoon:8180
depends_on:
- mockoon
- postgres
ports:
- "8080:8080"
mockoon:
image: mockoon/cli
command: -p 8180 -d /config/users-api.json
ports:
- "8180:8180"
volumes:
- ./mockoon:/config
postgres:
image: postgres
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "blue-elephant" #Postgres's logo is an elephant :P
POSTGRES_DB: "kotlin_crud"
ports:
- "65432:5432" #Different port to not conflict with any possible real/default Postgres installation
#Database to hold K6 tests results
influxdb:
image: influxdb:1.8
networks:
- k6
- grafana
ports:
- "8086:8086"
environment:
- INFLUXDB_DB=k6
# UI to view K6 tests results
grafana:
image: grafana/grafana:10.0.3
networks:
- grafana
ports:
- "3000:3000"
environment:
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_BASIC_ENABLED=false
- GF_SERVER_SERVE_FROM_SUB_PATH=true
volumes:
- ./grafana/dashboards:/var/lib/grafana/dashboards
- ./grafana/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
- ./grafana/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
# K6 Load Test
k6:
image: grafana/k6:0.45.1
command: run /scripts/start.js
networks:
- k6
ports:
- "6565:6565"
environment:
- K6_OUT=influxdb=http://influxdb:8086/k6
volumes:
- ./grafana-k6/scripts:/scripts
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
k6:
driver: bridge
grafana: