-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (60 loc) · 1.55 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
version: '3'
services:
telegram_stock_bot:
environment:
- API_TOKEN
- CHAT_ID
build: '.'
image: telegram_stock_bot
links:
- telegraf
depends_on:
- telegraf
influxdb:
image: ${ARCH}/influxdb:latest
volumes:
# Mount for influxdb data directory and configuration
- influxdbv2:/.influxdbv2
ports:
- "8086:8086"
expose:
- "8086"
# Use the influx cli to set up an influxdb instance.
influxdb_cli:
environment:
- INFLUXDB_TOKEN
- INFLUXDB_BUCKET_NAME
- INFLUXDB_ORG_NAME
- INFLUXDB_USERNAME
- INFLUXDB_PASSWORD
links:
- influxdb
image: ${ARCH}/influxdb:latest
# Use these same configurations parameters in your telegraf configuration, telegraf.conf.
entrypoint: "influx setup \
--bucket ${INFLUXDB_BUCKET_NAME} \
-t ${INFLUXDB_TOKEN} \
-o ${INFLUXDB_ORG_NAME} \
--username=${INFLUXDB_USERNAME} \
--password=${INFLUXDB_PASSWORD} \
--host=http://influxdb:8086 \
-f"
# Wait for the influxd service in the influxdb container has fully bootstrapped before trying to setup an influxdb instance with the influxdb_cli service.
restart: on-failure:10
depends_on:
- influxdb
telegraf:
environment:
- INFLUXDB_TOKEN
- INFLUXDB_BUCKET_NAME
- INFLUXDB_ORG_NAME
image: ${ARCH}/telegraf
links:
- influxdb
volumes:
# Mount for telegraf config
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
depends_on:
- influxdb_cli
volumes:
influxdbv2: