37 lines
737 B
Docker
37 lines
737 B
Docker
# Don't upgrade node! pnpm is broken on 22
|
|
FROM node:20
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install system-level dependencies
|
|
RUN apt-get update -y && \
|
|
apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
git \
|
|
inotify-tools \
|
|
ffmpeg \
|
|
mktorrent \
|
|
python3 \
|
|
python3-pip \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Enable corepack
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
# Copy and install dependencies
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN pnpm install --frozen-lockfile --prod
|
|
|
|
# Copy the rest of the code
|
|
COPY . .
|
|
|
|
# Build the app
|
|
RUN pnpm run build
|
|
|
|
# Expose the port
|
|
EXPOSE 5000
|
|
|
|
# Start the app
|
|
CMD ["pnpm", "start"]
|