Files
Momento/memento-note/Dockerfile.socket.prebuilt
Antigravity fdb148144e
Some checks failed
CI / Lint, Test & Build (push) Failing after 7m48s
CI / Deploy production (on server) (push) Has been cancelled
fix: restore brainstorming feature with missing socket server and real-time events
2026-05-19 20:07:56 +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 --only=production && npm install tsx
ENV NODE_ENV=production
ENV SOCKET_PORT=3002
ENV SOCKET_HTTP_PORT=3003
CMD ["npx", "tsx", "socket-server.ts"]