influxdata / influxdata/influxdata-docker
Why retention policy environment variable doesn't work?
- Dominant language
- Shell
- Stars
- 364
- Forks
- 255
- Avg merge
- 3h 18m
- Merged PRs (30d)
- 7
Description
I use _influxdb v1.7.11_ in a docker container. I read there is an env var in [hub.docker influxdb description](https://hub.docker.com/_/influxdb?tab=description) in order to set a retention policy on a database. However, it doesn't work!
> `DOCKER_INFLUXDB_INIT_RETENTION`: The duration the system's initial bucket should retain data. If not set, the initial bucket will retain data forever.
Here's a piece of my `docker-compose.yml`:
```
influxdb:
image: influxdb:1.7.11
ports:
- "8086:8086"
environment:
- INFLUXDB_DB=metrics
- INFLUXDB_USER=root
- INFLUXDB_USER_PASSWORD=root
- INFLUXDB_RETENTION_ENABLED=true
- INFLUXDB_INIT_RETENTION=2h
- DOCKER_INFLUXDB_INIT_RETENTION=2h
volumes:
- ./influxdb:/var/lib/influxdb
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the documented environment variables with the initialization behavior of the influxdb:1.7.11 Docker image, using the provided docker-compose.yml configuration as the reproduction case. Confirm whether the retention policy is created for the metrics database and determine which variable is effective; done means the configured 2h retention policy is applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, shell
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100