blakeblackshear / blakeblackshear/frigate

Specify BASE_DIR via environment in docker

Open
#3,452 5 comments 0 reactions 0 assignees View on GitHub
enhancement planned
Dominant language
TypeScript
Stars
35.9k
Forks
3.6k
Avg merge
9h 7m
Merged PRs (30d)
118

Description

**Describe what you are trying to accomplish and why in non technical terms**
Hey @blakeblackshear, it would be great if I could specify BASE_DIR from docker environment instead of the hardcoded /media/frigate.

Personally, I just want to use /data/frigate so when I run lsof commands on my host they point to the correct place and lsof wont then show:

`frigate.o 26730 root mem REG 0,38 32897 /media/frigate/frigate.db-shm (stat: No such file or directory)`

**Describe the solution you'd like**
An environment variable to override the default BASE_DIR:

```
import os
BASE_DIR = os.environ.get("FRIGATE_BASE_DIR", "/media/frigate")
CLIPS_DIR = f"{BASE_DIR}/clips"
RECORD_DIR = f"{BASE_DIR}/recordings"
CACHE_DIR = "/tmp/cache"
YAML_EXT = (".yaml", ".yml")
```

**Describe alternatives you've considered**

Possibly you could define the directories in the config file too.

Contributor guide

Open the contributing guide

Research direction

Start by locating the BASE_DIR definition and the Docker environment configuration. Verify that an environment variable can override /media/frigate and that the clips and recordings paths use the resulting base directory; the cache path should remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
backend, devops
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.