Skip to content

Commit 2cc1422

Browse files
committed
writing influxdb data to usb drive
1 parent f17e272 commit 2cc1422

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
# Mount for influxdb data directory
1212
- 'influx-data:/var/lib/influxdb'
1313
# Mount for influxdb configuration
14-
- 'influx-config:/etc/influxdb/'
14+
# 'influx-config:/etc/influxdb/'
1515
ports:
1616
# The API for InfluxDB is served on port 8086
1717
- "8086:8086"

influxdb/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ RUN echo "LABEL=influxdb /mnt/usbdrive ext4 rw,relatime,discard,data=ordered 0 2
44

55
# The script "my_entrypoint.sh" is an extension of the existing script with extra instructions to mount the usb memory stick.
66
COPY my_entrypoint.sh /entrypoint.sh
7-
RUN chmod +x /entrypoint.sh
7+
RUN chmod +x /entrypoint.sh
8+
9+
COPY influxdb.conf /etc/influxdb

influxdb/influxdb.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[meta]
2+
dir = "/mnt/usbdrive/influxdb/meta"
3+
4+
[data]
5+
dir = "/mnt/usbdrive/influxdb/data"
6+
engine = "tsm1"
7+
wal-dir = "/mnt/usbdrive/influxdb/wal"

influxdb/my_entrypoint.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/bash
2-
# JVA 2018-11-15 I have added following instructions to mount usbdrive
2+
# JVA 2018-11-15 I have added following instructions to mount usbdrive and create subfolder influxdb
33
mkdir -p /mnt/usbdrive
44
mount /mnt/usbdrive
55

6+
mkdir -p /mnt/usbdrive/influxdb
7+
68
# here below copy paste of original entrypoint.sh. see :
79
# https://github.com/influxdata/influxdata-docker/tree/35d89882b57f333d9518b4556e7b872ce970e620/influxdb/1.7
810
set -e

0 commit comments

Comments
 (0)