From 82f7011f29fd1a4d407ee5c3b11a76be5450fc8c Mon Sep 17 00:00:00 2001 From: Saturn-V Date: Wed, 11 Oct 2023 16:40:09 -0700 Subject: [PATCH] use bash script instead --- docker/Dockerfile | 2 +- docker/init.iql | 1 - docker/init.sh | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 docker/init.iql create mode 100644 docker/init.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index a163562..faab05e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,4 +3,4 @@ FROM influxdb:1.8 # add init.sh to initdb entry point so it's run on container start RUN mkdir -p /docker-entrypoint-initdb.d/ -COPY ./docker/init.iql /docker-entrypoint-initdb.d +COPY ./docker/init.sh /docker-entrypoint-initdb.d diff --git a/docker/init.iql b/docker/init.iql deleted file mode 100644 index bd6eb99..0000000 --- a/docker/init.iql +++ /dev/null @@ -1 +0,0 @@ -CREATE DATABASE $DB_NAME; \ No newline at end of file diff --git a/docker/init.sh b/docker/init.sh new file mode 100644 index 0000000..ce8edea --- /dev/null +++ b/docker/init.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "influx -execute 'CREATE DATABASE $DB_NAME;'" | /bin/sh