Expose config to docker volume (#73)
* expose config to docker volume * fix dockerfile
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -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" ]
|
||||
|
||||
Reference in New Issue
Block a user