-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
110 lines (103 loc) · 2.2 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
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
107
108
109
110
version: '3.2'
services:
chronograf:
restart: always
image: chronograf
networks:
backend:
ports:
- "8888:8888"
environment:
influxdb-url: "http://db:8086"
volumes:
- chronograf:/var/lib/chronograf
influxdb:
restart: always
image: influxdb
networks:
backend:
aliases:
- db
environment:
INFLUXDB_HTTP_AUTH_ENABLED: "true"
INFLUXDB_ADMIN_USER: "${DB_ROOT_USER}"
INFLUXDB_ADMIN_PASSWORD: "${DB_ROOT_PW}"
INFLUXDB_DB: "${DB_NAME}"
INFLUXDB_USER: "${DB_USER}"
INFLUXDB_USER_PASSWORD: "${DB_PW}"
INFLUX_SKIP_DATABASE_CREATION: "true"
INFLUXDB_HTTP_FLUX_ENABLED: "true"
volumes:
- influxdb:/var/lib/influxdb
broker:
restart: always
image: eclipse-mosquitto
networks:
backend:
aliases:
- "broker"
ports:
- "1883:1883"
- "9001:9001"
telegraf:
restart: always
image: telegraf
networks:
backend:
volumes:
- "./telegraf.conf:/etc/telegraf/telegraf.conf:ro"
depends_on:
- broker
- influxdb
environment:
INFLUX_URL: db
INFLUXDB_DB: "${DB_NAME}"
INFLUXDB_USER: "${DB_USER}"
INFLUXDB_USER_PASSWORD: "${DB_PW}"
api:
restart: always
build:
context: api
ports:
- "5000:5000"
networks:
backend:
aliases:
- api
depends_on:
- influxdb
- broker
volumes:
- "./api:/usr/src/app"
environment:
INFLUXDB_BUCKET: "${DB_NAME}"
INFLUXDB_V2_URL: "http://db:8086"
# INFLUXDB_V2_ORG: "${DB_NAME}"
INFLUXDB_V2_TOKEN: "${DB_USER}:${DB_PW}"
# INFLUXDB_V2_TIMEOUT: 10000
nginx:
image: nginx
volumes:
- ./client/dist:/usr/share/nginx/html
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- "80:80"
depends_on:
- api
networks:
- backend
client-builder:
image: node:12
working_dir: /home/node/app
environment:
- NODE_ENV=development
volumes:
- ./client/:/home/node/app
networks:
- backend
command: bash -c "npm i; npm run build; npm run watch"
networks:
backend:
volumes:
influxdb:
chronograf: