makefuture / mp-relay / Dockerfile
127 words
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# The nordschleife multiplayer relay.
#
# A single Node process holding room state in memory. There is no database and
# nothing on disk: if this container restarts, every race in progress ends and
# players rejoin within a few seconds. That is an acceptable trade for a game
# relay, and it is why this image has no volumes.

FROM node:22-alpine

WORKDIR /app

# Dependencies first, so a change to server.js does not reinstall `ws`.
COPY package.json package-lock.json ./
RUN npm ci --omit=dev

COPY server.js ./

# Matches the PORT default in server.js. Never published to the host: Caddy
# reaches this over the web-edge Docker network, so the relay is not directly
# addressable from the internet.
EXPOSE 8090

USER node

CMD ["node", "server.js"]

static mirror of HEAD · about · clone: git clone https://git.makefuture.ro/makefuture.git