-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.local.yaml
106 lines (106 loc) · 2.85 KB
/
compose.local.yaml
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
name: agriculture-local
services:
watchtower:
image: containrrr/watchtower:latest
command:
- "--label-enable"
- "--interval"
- "30"
- "--rolling-restart"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- com.centurylinklabs.watchtower.enable=true
reverse-proxy:
image: traefik:latest
restart: unless-stopped
command:
- "--log.level=DEBUG"
- "--metrics.prometheus=true"
- "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0"
- "--api.insecure=true"
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
#- "--providers.docker.allowemptyservices=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.metrics.address=:8899"
- "--metrics.prometheus.entryPoint=metrics"
ports:
- 80:80
- 8080:8080
# - 8899:8899
expose:
- 8899
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- com.centurylinklabs.watchtower.enable=true
api:
build: api/.
environment:
- HOST=api.localhost
- ENV=sb
- ENDPOINT=http://microcks:8080/rest/agriculture-api/1.0.0
- TIMEOUT=5000
restart: unless-stopped
expose:
- 3000
labels:
- traefik.enable=true
- traefik.http.routers.api.rule=Host("api.localhost")
- com.centurylinklabs.watchtower.enable=true
importer:
build: mocks/.
depends_on:
microcks:
condition: service_started
microcks:
image: quay.io/microcks/microcks-uber:latest-native
depends_on:
api:
condition: service_started
restart: unless-stopped
expose:
- 8080
volumes:
- microcksdata:/deployments/config
labels:
- traefik.enable=true
- traefik.http.routers.microcks.rule=Host("mocks.localhost")
- com.centurylinklabs.watchtower.enable=true
prometheus:
image: prom/prometheus:latest
volumes:
- ./monitoring/prometheus:/etc/prometheus
- prometheusdata:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
expose:
- 9090
depends_on:
- reverse-proxy
labels:
- traefik.enable=true
- traefik.http.routers.prometheus.rule=Host("prometheus.localhost")
- com.centurylinklabs.watchtower.enable=true
restart: unless-stopped
grafana:
image: grafana/grafana:latest
environment:
- GF_DEFAULT_INSTANCE_NAME=agriculture-api
- GF_PATHS_CONFIG=/etc/grafana/provisioning/custom.local.ini
volumes:
- ./monitoring/grafana:/etc/grafana/provisioning
expose:
- 3000
user: "104"
depends_on:
- prometheus
labels:
- traefik.enable=true
- traefik.http.routers.grafana.rule=Host("grafana.localhost")
- com.centurylinklabs.watchtower.enable=true
restart: unless-stopped
volumes:
microcksdata:
prometheusdata: