Specify BASE_DIR via environment in docker
See original GitHub issueDescribe 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.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Environment variables in Compose | Docker Documentation
You can set default values for environment variables using a .env file, which Compose automatically looks for in project directory (parent folder of...
Read more >Docker: adding a file from a parent directory - Stack Overflow
Let's say you want to copy dir2 content into a new docker image using COPY or ADD of dockerfile that is in dir11...
Read more >docker-volume-basedir in sam local start-lambda is not used ...
It seems to have no effect at all. Logs still shows paths of devcontainer not the path of host machine I specified via...
Read more >Docker and JAVA_OPTS - Veracode
While adjusting some environment variables recently, I came across an odd issue with Docker, Spring Boot and JAVA_OPTS.
Read more >How to Set Docker Environment Variables {ARG and ENV}
1. Create a directory for the new Docker image and cd into the path. mkdir [directory-path] && cd [directory-path] · 2. Create a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has other implications since nginx uses the media directory as well. It would require making that config dynamic and today it is statically defined. I am fine leaving this open in case one day it makes sense.
I would still like this ability… thanks 😃