Files
QueueCube/Dockerfile

39 lines
771 B
Docker

# Build stage
FROM --platform=$TARGETPLATFORM node:20-slim AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY frontend/package*.json ./frontend/
# Install dependencies
RUN npm ci
RUN cd frontend && npm ci
# Copy source files
COPY . .
# Build frontend and backend
RUN npm run build
# Production stage
FROM --platform=$TARGETPLATFORM debian:testing-20250203
RUN apt-get update && apt-get install -y \
mpv npm yt-dlp pulseaudio pulseaudio-utils \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install only production dependencies
COPY package*.json ./
RUN npm ci --production
# Copy built files
COPY --from=builder /app/build ./build
COPY --from=builder /app/frontend/dist ./dist/frontend
EXPOSE 3000
CMD ["node", "build/server.js"]