Respect YTDLP_SITE_CONFIG_DIR
This commit is contained in:
@@ -33,7 +33,7 @@ docker run --rm -it \
|
||||
docker run --rm -it \
|
||||
-p 3000:8080 \
|
||||
--env YTDLP_SITE_DATA_DIR=/data \
|
||||
--env YTDLP_SITE_CONFIG_DIR=/config \
|
||||
--env YTDLP_SITE_CONFIG_DIR=/data/config \
|
||||
--env YTDLP_SITE_ADMIN_INITIAL_PASSWORD=abc123 \
|
||||
-v $(realpath data):/data \
|
||||
server
|
||||
@@ -71,4 +71,4 @@ Build and push this container to ghcr
|
||||
- [ ] move original video to bottom
|
||||
- [x] sort videos most to least recent
|
||||
- [x] header on playlist page
|
||||
- [ ] Choose database directory
|
||||
- [x] Choose database directory
|
||||
|
@@ -18,7 +18,12 @@ func GetDataDir() string {
|
||||
return "data"
|
||||
}
|
||||
|
||||
// defaults to GetDataDir() / config
|
||||
func GetConfigDir() string {
|
||||
value, exists := os.LookupEnv("YTDLP_SITE_CONFIG_DIR")
|
||||
if exists {
|
||||
return value
|
||||
}
|
||||
return filepath.Join(GetDataDir(), "config")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user