mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-19 20:27:48 -05:00
Fix patches crossing between concurrent uploads; pin backend deps
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>
This commit is contained in:
@@ -14,8 +14,9 @@ ENV HOME=/home/app
|
|||||||
|
|
||||||
|
|
||||||
RUN mkdir -p /home/app
|
RUN mkdir -p /home/app
|
||||||
COPY package.json /tmp
|
# npm ci installs exactly what package-lock.json lists, so rebuilds don't pick up newer versions.
|
||||||
RUN cd /tmp && npm --unsafe-perm install -g node-gyp && npm --unsafe-perm install
|
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
|
RUN mkdir -p /home/app/upload && cp -a /tmp/node_modules /home/app
|
||||||
|
|
||||||
WORKDIR $HOME/
|
WORKDIR $HOME/
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ exports.upload = async function (req, res, next) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
patches = [];
|
const patches = [];
|
||||||
|
|
||||||
let req_patches;
|
let req_patches;
|
||||||
req_patches = req.body.patch_list;
|
req_patches = req.body.patch_list;
|
||||||
|
|||||||
3737
backend/package-lock.json
generated
3737
backend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user