Expose config to docker volume (#73)

* expose config to docker volume

* fix dockerfile
This commit is contained in:
Marco
2023-08-02 11:54:27 +02:00
committed by GitHub
parent db5097c889
commit e2dd54add2
4 changed files with 20 additions and 16 deletions

View File

@@ -1,25 +1,27 @@
FROM golang:1.20-alpine AS build
# folder structure
WORKDIR /usr/src/yt-dlp-webui
# install core dependencies
RUN apk update && \
apk add nodejs npm go
# copia la salsa
COPY . .
# build frontend
WORKDIR /usr/src/yt-dlp-webui/frontend
RUN npm install
RUN npm run build
# build backend + incubator
WORKDIR /usr/src/yt-dlp-webui
RUN CGO_ENABLED=0 GOOS=linux go build -o yt-dlp-webui
# but here yes :)
FROM alpine:edge
WORKDIR /downloads
VOLUME /downloads
WORKDIR /config
VOLUME /config
WORKDIR /app
RUN apk update && \
@@ -30,4 +32,4 @@ COPY --from=build /usr/src/yt-dlp-webui/yt-dlp-webui /app
ENV JWT_SECRET=secret
EXPOSE 3033
ENTRYPOINT [ "./yt-dlp-webui" , "--out", "/downloads" ]
ENTRYPOINT [ "./yt-dlp-webui" , "--out", "/downloads", "--conf", "/config/config.yml" ]