-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 1.6 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
version: '3'
services:
nginx:
image: "nginx:alpine"
ports:
# EXPLAIN(tofull) We need to use JAKARNOTATOR_PORT_MAPPED variable
# because of grafana login redirection
# if ports set to "8080:80", nginx redirect well localhost:8080 to jakarnotator
# But nginx will redirect localhost:8080/grafana to grafana with http_port = 80 (port open inside nginx).
# When we access : http://localhost:8080/grafana in our host browser,
# grafana will automatically redirect to /login on : http://localhost:80/grafana/login
# which is not the right port mapped (it should be 8080),
# except if we work only with ports "80:80",
# or using the same variable like JAKARNOTATOR_PORT_MAPPED (see below in section environnement var in grafana)
- "${JAKARNOTATOR_PORT_MAPPED}:80"
depends_on:
- grafana
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
jakarnotator:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./jakarnotator/public/data:/app/public/data
depends_on:
- redis
environment:
- HOST_REDIS=redis
command: npm start
redis:
image: "redis"
prometheus:
image: "prom/prometheus"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
depends_on:
- jakarnotator
grafana:
image: "grafana/grafana:5.1.0"
depends_on:
- prometheus
volumes:
- ./grafana/provisioning:/provisioning
environment:
- GF_PATHS_PROVISIONING=/provisioning
- GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:${JAKARNOTATOR_PORT_MAPPED}/grafana