Skip to content

2025-03-05 Chronograf - old-menu branch - PR 2 of 2 #788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .templates/chronograf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM chronograf:alpine

# see https://github.com/influxdata/influxdata-docker/pull/781
# this patch can be withdrawn if/when PR781 is applied.

COPY entrypoint.sh /entrypoint.sh

# EOF
25 changes: 25 additions & 0 deletions .templates/chronograf/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
set -e

if [ "${1:0:1}" = '-' ]; then
set -- chronograf "$@"
fi

if [ "$1" = 'chronograf' ]; then
export BOLT_PATH=${BOLT_PATH:-/var/lib/chronograf/chronograf-v1.db}
fi

if [ $(id -u) -eq 0 ] ; then
if [ "${CHRONOGRAF_AS_ROOT}" != "true" ] ; then
chown -Rc chronograf:chronograf /var/lib/chronograf
exec su-exec chronograf "$@"
fi
chown -Rc root:root /var/lib/chronograf
else
if [ ! -w /var/lib/chronograf ] ; then
echo "You need to change ownership on chronograf's persistent store. Run:"
echo " sudo chown -R $(id -u):$(id -u) /path/to/persistent/store"
fi
fi

exec "$@"
5 changes: 3 additions & 2 deletions .templates/chronograf/service.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
chronograf:
container_name: chronograf
image: chronograf:latest
build:
context: ./.templates/chronograf/.
restart: unless-stopped
environment:
- TZ=${TZ:-Etc/UTC}
Expand All @@ -10,11 +11,11 @@
# - INFLUXDB_PASSWORD=
# - INFLUXDB_ORG=
# - KAPACITOR_URL=http://kapacitor:9092
# - CHRONOGRAF_AS_ROOT=true
ports:
- "8888:8888"
volumes:
- ./volumes/chronograf:/var/lib/chronograf
depends_on:
- influxdb
# - kapacitor