-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.sandbox.yaml
105 lines (105 loc) · 3.2 KB
/
compose.sandbox.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
name: agriculture-sandbox
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:
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=#{DOMAIN_REGISTER_EMAIL}#"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--metrics.prometheus=true"
- "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0"
- "--entrypoints.metrics.address=:8899"
- "--metrics.prometheus.entryPoint=metrics"
ports:
- 80:80
- 443:443
expose:
- 8899
volumes:
- letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock
labels:
- com.centurylinklabs.watchtower.enable=true
api:
image: poi9912/agriculture-api:#{IMAGE_VERSION}#
environment:
- HOST=agricultureapi.#{SANDBOX_HOST}#
- ENV=sb
- ENDPOINT=http://microcks:8080/rest/agriculture-api/1.0.0
- TIMEOUT=5000
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.api.rule=Host("agricultureapi.#{SANDBOX_HOST}#")
- traefik.http.routers.api.entrypoints=websecure
- traefik.http.routers.api.tls.certresolver=myresolver
importer:
image: poi9912/agriculture-mock-importer:#{IMAGE_VERSION}#
depends_on:
microcks:
condition: service_started
microcks:
depends_on:
api:
condition: service_started
image: quay.io/microcks/microcks-uber:latest-native
restart: unless-stopped
expose:
- 8080
volumes:
- microksdata:/deployments/config
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:
- 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.ini
volumes:
- ./monitoring/grafana:/etc/grafana/provisioning
expose:
- 3000
user: "104"
depends_on:
- prometheus
labels:
- traefik.enable=true
- traefik.http.routers.grafana.rule=Host("agriculturegrafana.#{SANDBOX_HOST}#")
- traefik.http.routers.grafana.entrypoints=websecure
- traefik.http.routers.grafana.tls.certresolver=myresolver
- com.centurylinklabs.watchtower.enable=true
restart: unless-stopped
volumes:
letsencrypt:
microksdata:
prometheusdata: