Files
Momento/memento-note/Dockerfile.socket.prebuilt
Antigravity cb4c1cc9ad
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m44s
CI / Deploy production (on server) (push) Successful in 54s
fix: Dockerfile.socket.prebuilt — --legacy-peer-deps manquant
npm install sans --legacy-peer-deps échoue sur le conflit
@tiptap/core 3.22.5 vs 3.23.6 (collaboration vs starter-kit).
Aussi: --only=production → --omit=dev (npm 10+).
2026-06-20 14:55:57 +00:00

36 lines
1.2 KiB
Docker

FROM node:22-bookworm-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
openssl \
&& rm -rf /var/lib/apt/lists/*
# In prebuilt mode, we expect node_modules to be partially there or we use the standalone's ones
# Actually, the artifact has node_modules/.prisma etc. but not the full node_modules.
# However, the standalone folder HAS node_modules.
# But we need tsx and socket.io.
# So we still need a minimal npm install or just use the pre-installed ones if we can.
# Let's keep it simple: if it's prebuilt, we just copy what we need.
# But tsx is a devDependency.
# Better to just use the full Dockerfile.socket for now as it's more reliable.
# "tsx" is not in the standalone output.
# Wait, I can just use the same strategy as memento-note:
# if ARTIFACT_TGZ is present, we already tar'ed the files.
# But we still need to run them.
COPY socket-server.ts ./
COPY tsconfig.json ./
COPY package.json package-lock.json* ./
# We still need to install dependencies because standalone doesn't have all of them (like tsx)
RUN npm install --omit=dev --legacy-peer-deps && npm install tsx --legacy-peer-deps
ENV NODE_ENV=production
ENV SOCKET_PORT=3002
ENV SOCKET_HTTP_PORT=3003
CMD ["npx", "tsx", "socket-server.ts"]