-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (26 loc) · 866 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (26 loc) · 866 Bytes
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
# Build Vite frontend
FROM node:20-alpine AS frontend-build
WORKDIR /app/dromeport
COPY dromeport/package.json dromeport/package-lock.json* ./
RUN npm ci
COPY dromeport/ ./
RUN npm run build
# Python backend
FROM python:3.12-slim
# ffmpeg - transcoding (Opus / MP3)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY backend/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY backend/ ./
COPY --from=frontend-build /app/dromeport/dist ./static
RUN useradd -m -u 1000 dromeport \
&& chown -R dromeport:dromeport /app
USER dromeport
# Ensure user-local pip-installed scripts (e.g. updated yt-dlp) are on PATH
ENV PATH="/home/dromeport/.local/bin:${PATH}"
EXPOSE 8080
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]