mirror of
https://github.com/marcopiovanello/yt-dlp-web-ui.git
synced 2026-07-25 06:54:30 +00:00
fixed env propagation in docker
This commit is contained in:
+2
-1
@@ -24,7 +24,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o yt-dlp-webui
|
||||
|
||||
|
||||
|
||||
FROM python:3-alpine3.22
|
||||
FROM python:alpine
|
||||
|
||||
RUN apk update && \
|
||||
apk add ffmpeg ca-certificates curl wget gnutls deno --no-cache && \
|
||||
@@ -38,6 +38,7 @@ COPY --from=build /usr/src/yt-dlp-webui/yt-dlp-webui /app
|
||||
|
||||
ENV APP_PATHS_DOWNLOAD_PATH="/downloads"
|
||||
ENV APP_PATHS_LOCAL_DATABASE_PATH="/config"
|
||||
ENV APP_PATHS_JS_RUNTIME_PATH="deno:/usr/bin/deno"
|
||||
|
||||
EXPOSE 3033
|
||||
ENTRYPOINT [ "./yt-dlp-webui", "--conf", "/config/config.yml"]
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/marcopiovanello/yt-dlp-web-ui/v3/server"
|
||||
@@ -38,7 +39,7 @@ func main() {
|
||||
// Defaults
|
||||
v.SetDefault("server.host", "0.0.0.0")
|
||||
v.SetDefault("server.port", 3033)
|
||||
v.SetDefault("server.queue_size", 2)
|
||||
v.SetDefault("server.queue_size", runtime.NumCPU())
|
||||
v.SetDefault("paths.download_path", ".")
|
||||
v.SetDefault("paths.downloader_path", "yt-dlp")
|
||||
v.SetDefault("paths.local_database_path", ".")
|
||||
@@ -48,6 +49,7 @@ func main() {
|
||||
|
||||
// Env binding
|
||||
v.SetEnvPrefix("APP")
|
||||
v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
v.AutomaticEnv()
|
||||
|
||||
// Load YAML file if exists
|
||||
@@ -88,6 +90,8 @@ func main() {
|
||||
"host", cfg.Server.Host,
|
||||
"port", cfg.Server.Port,
|
||||
"queue_size", cfg.Server.QueueSize,
|
||||
"downloader", cfg.Paths.DownloaderPath,
|
||||
"download_dir", cfg.Paths.DownloadPath,
|
||||
)
|
||||
|
||||
if err := server.Run(ctx, &server.RunConfig{
|
||||
|
||||
Reference in New Issue
Block a user