DataStack CI Verification / node-regression (pull_request_target) Canceled after 1m41s
DataStack CI Verification / python-regression (pull_request_target) Canceled after 0s
DataStack CI Verification / quality (pull_request_target) Canceled after 0s
DataStack CI Verification / production-build (pull_request_target) Canceled after 0s
DataStack CI Verification / docker-image-build (pull_request_target) Canceled after 0s
DataStack CI Verification / security-audit (pull_request_target) Canceled after 0s
DataStack CI Verification / windows-compatibility (pull_request_target) Canceled after 1m58s
19 lines
971 B
Docker
19 lines
971 B
Docker
FROM node:22-alpine AS dependencies
|
|
WORKDIR /app
|
|
RUN apk add --no-cache git
|
|
COPY package.json package-lock.json* ./
|
|
COPY patches ./patches
|
|
RUN if [ -f package-lock.json ]; then npm ci --omit=dev; else npm install --omit=dev --no-audit --no-fund; fi
|
|
|
|
FROM node:22-alpine AS runner
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
ENV PORT_SOCKET=4000
|
|
RUN apk add --no-cache su-exec \
|
|
&& mkdir -p /app/storage/data /app/storage/.runtime-logs \
|
|
&& chown -R node:node /app/storage
|
|
COPY --from=dependencies --chown=node:node /app/node_modules ./node_modules
|
|
COPY --chown=node:node server ./server
|
|
EXPOSE 4000
|
|
CMD ["sh", "-c", "mkdir -p /app/storage/data /app/storage/.runtime-logs && NODE_UG=\"$(id -u node):$(id -g node)\" && if [ \"$(stat -c '%u:%g' /app/storage/data)\" != \"$NODE_UG\" ]; then chown -R node:node /app/storage; else chown node:node /app/storage /app/storage/data && chown -R node:node /app/storage/.runtime-logs; fi && exec su-exec node:node node server/index.js"]
|