-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
69 lines (65 loc) · 2.21 KB
/
docker-compose.dev.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
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
logging:
driver: "none"
jakarnotator:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./jakarnotator/bin:/app/bin
- ./jakarnotator/app.js:/app/app.js
- ./jakarnotator/node_modules_project:/app/node_modules_project
- ./jakarnotator/package.json:/app/package.json
- ./jakarnotator/routes:/app/routes
- ./jakarnotator/views:/app/views
- ./jakarnotator/gulpfile.js:/app/gulpfile.js
- ./jakarnotator/nodemon.json:/app/nodemon.json
- ./jakarnotator/public:/app/public
depends_on:
- redis
environment:
- HOST_REDIS=redis
# TODO(tofull) Find a way to run browser-sync module via gulp in docker
# command: npm run dev
command: npm start
redis:
image: "redis"
logging:
driver: "none"
prometheus:
image: "prom/prometheus"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
depends_on:
- jakarnotator
logging:
driver: "none"
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
logging:
driver: "none"