mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-19 20:27:48 -05:00
patches was an implicit global set before an await, so concurrent uploads could save each other's patch lists. Replace the stale 2024 lockfile with the one from the running production image (436 packages, verified identical) and install with npm ci, so uncached rebuilds stop pulling newer versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
859 B
Docker
27 lines
859 B
Docker
# docker build -t smartnet-player .
|
|
# do a `git pull` in smartnet-player to update
|
|
|
|
FROM node:22-bookworm
|
|
|
|
# RUN echo deb https://www.deb-multimedia.org bullseye main non-free \
|
|
# >>/etc/apt/sources.list && apt-get update -oAcquire::AllowInsecureRepositories=true &&\
|
|
# apt-get install -y --force-yes deb-multimedia-keyring && \
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y ffmpeg cron python3 build-essential g++
|
|
|
|
ENV HOME=/home/app
|
|
|
|
|
|
RUN mkdir -p /home/app
|
|
# npm ci installs exactly what package-lock.json lists, so rebuilds don't pick up newer versions.
|
|
COPY package.json package-lock.json /tmp/
|
|
RUN cd /tmp && npm --unsafe-perm install -g node-gyp && npm --unsafe-perm ci
|
|
RUN mkdir -p /home/app/upload && cp -a /tmp/node_modules /home/app
|
|
|
|
WORKDIR $HOME/
|
|
COPY . $HOME/
|
|
RUN npm install -g nodemon
|
|
# Run the command on container startup
|
|
CMD node index.js
|