Spaces:
Sleeping

node-edge-3 / Dockerfile
Leogron777
relay
36e04cf
Raw History Blame Contribute Delete
710 Bytes
# Nucleus relay — RAM-only onion forwarder. No volumes, nothing persisted.
# Used by Back4app Containers and Hugging Face Spaces (Docker SDK).
#
# Render does NOT need this file (it auto-detects Node from package.json).
#
# The relay honors the platform's injected $PORT. Hugging Face Spaces require the
# app to listen on 7860 and the container to run as a non-root user — both set
# below. Back4app injects its own $PORT, which overrides ENV PORT at runtime.
FROM node:20-alpine
WORKDIR /app
COPY package.json ./
RUN npm install --omit=dev
COPY server.mjs ./
# Hugging Face default app port + non-root user (harmless on other platforms).
ENV PORT=7860
EXPOSE 7860
USER 1000
CMD ["node", "server.mjs"]