Code refactoring and bump deps

This commit is contained in:
2023-04-13 11:13:40 +02:00
parent 7f602f1e20
commit 621164589f
16 changed files with 455 additions and 344 deletions

View File

@@ -1,7 +1,4 @@
# Multi stage build Dockerfile
# There's no point in using the edge (development branch of alpine)
FROM alpine:3.17 AS build
FROM golang:1.20-alpine AS build
# folder structure
WORKDIR /usr/src/yt-dlp-webui
# install core dependencies
@@ -15,7 +12,7 @@ RUN npm install
RUN npm run build
# build backend + incubator
WORKDIR /usr/src/yt-dlp-webui
RUN go build -o yt-dlp-webui
RUN CGO_ENABLED=0 GOOS=linux go build -o yt-dlp-webui
# but here yes :)
FROM alpine:edge
@@ -28,8 +25,7 @@ WORKDIR /app
RUN apk update && \
apk add psmisc ffmpeg yt-dlp
COPY --from=build /usr/src/yt-dlp-webui /app
RUN chmod +x /app/yt-dlp-webui
COPY --from=build /usr/src/yt-dlp-webui/yt-dlp-webui /app
EXPOSE 3033
CMD [ "./yt-dlp-webui" , "--out", "/downloads" ]