influxdata / influxdata/influxdb
Set a default retention policy using env variables and docker
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Is that possible to set a default retention policy on the db created with the `INFLUXDB_DB` env variable with docker?
Here is my `docker-compose.yml` file:
```yaml
grafana-db:
container_name: grafana-db
image: influxdb:1.7-alpine
volumes:
- my_data:/var/lib/influxdb
environment:
- INFLUXDB_DB=my_db
- INFLUXDB_USER=my_user
- INFLUXDB_USER_PASSWORD=my_password
restart: unless-stopped
user: "1000"
```
That would be nice to be able to do that without having to write a custom init script and so a `Dockerfile` only for this.
Contributor guide
Research direction
Start with the Docker configuration that handles INFLUXDB_DB and review the provided docker-compose.yml for how the database is created. Define how a default retention policy would be supplied through environment variables or Docker configuration, and verify that a database created from INFLUXDB_DB receives it without a custom init script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- database, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100