mirror of
https://lavaforge.org/spotizerr/spotizerr.git
synced 2025-12-24 02:39:14 -05:00
Merge branch main into ui-overhaul
This commit is contained in:
24
Dockerfile
24
Dockerfile
@@ -1,5 +1,22 @@
|
||||
# Use an official Python runtime as a parent image
|
||||
FROM python:3.12-slim
|
||||
# Stage 1: TypeScript build
|
||||
FROM node:22.16.0-slim AS typescript-builder
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy necessary files for TypeScript build
|
||||
COPY tsconfig.json ./tsconfig.json
|
||||
COPY src/js ./src/js
|
||||
|
||||
# Install TypeScript globally
|
||||
RUN npm install -g typescript
|
||||
|
||||
# Compile TypeScript
|
||||
RUN tsc
|
||||
|
||||
# Stage 2: Final image
|
||||
FROM python:3.12-slim AS python-builder
|
||||
LABEL org.opencontainers.image.source="https://github.com/Xoconoch/spotizerr"
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
@@ -10,8 +27,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gosu \
|
||||
git \
|
||||
ffmpeg \
|
||||
nodejs \
|
||||
npm \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -22,6 +37,7 @@ RUN npm install -g pnpm
|
||||
# Copy only the requirements file to leverage Docker cache
|
||||
COPY requirements.txt .
|
||||
# Install Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# --- Frontend Node.js Dependencies ---
|
||||
|
||||
Reference in New Issue
Block a user