-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (66 loc) · 1.91 KB
/
docker-compose.yml
File metadata and controls
74 lines (66 loc) · 1.91 KB
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
# PRODUCTION SETUP
# CONNECTOR is deployed using the latest container image in
# docker hub (https://cloud.docker.com/u/encresearch/repository/docker/encresearch/mqtt-connector).
# If a new :latest image is pushed, watchtower will automatically shutdown the container currently
# running, update it and re-deploy it.
version: '3.1'
volumes:
grafana_data: {}
influx_data: {}
services:
# DATA VISUALIZATION SERVICE
grafana:
container_name: grafana
image: grafana/grafana
expose:
- "3000"
volumes:
# TODO Makes sure data is stored in host only if
# TODO postgres is still not configured in the grafana.env file
- grafana_data:/var/lib/grafana
env_file:
- ./grafana/grafana.conf
restart: unless-stopped
# NGINX REVERSE PROXY
nginx:
build:
context: ./nginx/
dockerfile: Dockerfile
ports:
- 80:80
depends_on:
- grafana
restart: unless-stopped
# DATA GATHERING API SERVICE
connector:
container_name: connector
image: encresearch/connector:latest
environment:
- DB_HOST=influxdb
restart: unless-stopped
# DATA GATHERING API SERVICE
calculator:
container_name: calculator
image: encresearch/calculator:latest
environment:
- DB_HOST=influxdb
restart: unless-stopped
# DATABASE SERVICE
influxdb:
image: influxdb
container_name: influxdb
ports:
- "8083:8083"
- "8086:8086"
- "8090:8090"
volumes:
# Data persistency
- influx_data:/var/lib/influxdb
restart: unless-stopped
# AUTOMATIC CONTAINER UPDATING SERVICE
watchtower: # checks for changes in any of the installed images (on the latest tag)
image: v2tec/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock # mounts docker socket to interact with Docker's API
command: --interval 300 # Checks for changes every 5 minutes
restart: unless-stopped