-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.release
More file actions
63 lines (49 loc) · 1.82 KB
/
Dockerfile.release
File metadata and controls
63 lines (49 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Dockerfile.release — used by the CI release workflow only.
# Skips Go compilation entirely: the pre-built binary is injected via the
# build context (dist/youflac-server-<TARGETARCH>) so QEMU never compiles Go.
FROM debian:bookworm-slim
LABEL org.opencontainers.image.title="YouFlac"
LABEL org.opencontainers.image.description="YouTube Video + FLAC Audio = Perfect MKV"
LABEL org.opencontainers.image.source="https://github.com/kushiemoon-dev/YouFLAC"
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
python3 \
python3-mutagen \
python3-websockets \
python3-brotli \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp \
-o /usr/local/bin/yt-dlp \
&& chmod +x /usr/local/bin/yt-dlp
RUN useradd -m -u 1000 youflac \
&& mkdir -p /config /downloads /app \
&& chown -R youflac:youflac /config /downloads /app
WORKDIR /app
# BuildKit sets TARGETARCH automatically (amd64, arm64).
# The CI prepares dist/youflac-server-amd64 and dist/youflac-server-arm64.
ARG TARGETARCH
COPY dist/youflac-server-${TARGETARCH} ./youflac-server
COPY dist/frontend/ ./frontend/dist/
RUN chmod +x ./youflac-server \
&& chown -R youflac:youflac /app
USER youflac
ENV PORT=8080 \
OUTPUT_DIR=/downloads \
CONFIG_DIR=/config \
VIDEO_QUALITY=best \
CONCURRENT_DOWNLOADS=2 \
NAMING_TEMPLATE=jellyfin \
GENERATE_NFO=true \
EMBED_COVER_ART=true \
LYRICS_ENABLED=false \
LYRICS_EMBED_MODE=lrc \
THEME=dark \
ACCENT_COLOR=pink
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:${PORT}/api/health || exit 1
VOLUME ["/config", "/downloads"]
CMD ["./youflac-server"]