Spaces:
Sleeping

File size: 710 Bytes
4c119aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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"]