Files
Momento/memento-note/Dockerfile.socket

24 lines
624 B
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/*
COPY package.json package-lock.json* ./
RUN npm ci --legacy-peer-deps
# We only need the socket server and dependencies
COPY socket-server.ts ./
COPY tsconfig.json ./
# Environment defaults
ENV NODE_ENV=production
ENV SOCKET_PORT=3002
ENV SOCKET_HTTP_PORT=3003
# Run with tsx (included in devDependencies but we need it at runtime here)
# Alternatively, we could build it to JS, but tsx is easier for this standalone file.
CMD ["npx", "tsx", "socket-server.ts"]