Add Node.js to backend Dockerfile and enhance downloader
Added Node.js installation to the backend Dockerfile to support yt-dlp's JavaScript runtime. Updated downloader API to bypass SSL verification in Docker, improved error reporting, and convert video thumbnails to data URLs to avoid mixed content issues. In the frontend, improved Dockerfile.prod install process and added new service routes for drone and web services in App.tsx.
This commit is contained in:
@@ -1,13 +1,26 @@
|
||||
# Step 1: Build React (Vite) app
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
# If package-lock.json exists, npm ci is faster and reproducible
|
||||
RUN npm ci || npm install
|
||||
|
||||
# Clean install with force flag to bypass cache issues
|
||||
#RUN rm -rf node_modules package-lock.json && \
|
||||
# npm cache clean --force && \
|
||||
# npm install --legacy-peer-deps
|
||||
|
||||
# install
|
||||
RUN npm install --legacy-peer-deps
|
||||
|
||||
# Copy source files
|
||||
COPY . .
|
||||
|
||||
ENV NODE_ENV=production
|
||||
# Skip Orval - use pre-generated files committed to git
|
||||
ENV SKIP_ORVAL=true
|
||||
|
||||
# Build the app
|
||||
RUN npm run build
|
||||
|
||||
# Step 2: Nginx runtime
|
||||
|
||||
Reference in New Issue
Block a user