Change InfluxDB Retention.

This commit is contained in:
Jan Eitzinger 2021-08-17 18:26:53 +02:00
parent 57fec9a0b4
commit 255cd59ee6
2 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@ if [ $# -gt 0 ]; then
if [ $1 == "dev" ]; then
# 101 is the uid and gid of the user and group www in the cc-php container running php-fpm.
# For a demo with no new jobs it is enough to give www read permissions on that directory.
echo "This script needs to chown the job-archive directory so that the application can write to it:"
sudo chown -R 101:101 ./job-archive
mkdir -p influxdb/data
@ -19,8 +20,8 @@ if [ $# -gt 0 ]; then
cd influxdb/data
tar xJf ../../influxdbv2-data.tar.xz
rm ../../influxdbv2-data.tar.xz
cd ../..
# If development: Use SQL source including INFLUX-Job Metadata instead
cp ./sql-source/ClusterCockpit-dev.sql ./sql-init/ClusterCockpit.sql
fi

View File

@ -13,7 +13,7 @@ services:
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD}
DOCKER_INFLUXDB_INIT_ORG: ClusterCockpit
DOCKER_INFLUXDB_INIT_BUCKET: ClusterCockpit
DOCKER_INFLUXDB_INIT_RETENTION: 2w
DOCKER_INFLUXDB_INIT_RETENTION: 2y
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
ports:
- "127.0.0.1:${INFLUXDB_PORT}:8086"