Files
netris-nestri/containers/playsite.Containerfile
Kristian Ollikainen 51941e6560 feat: Standalone play site (#298)
## Description
Adds a basic standalone "play site" that mimics current one in apps/www.
This is so self-hosters don't need to host whole site, but can just use
small version of it.

Yet to test so marking as draft, not at home currently so may take some
time. Also might be good idea to make Caddy-powered container out of
this later?

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- New Features
- Introduces a standalone Play site with server output, accessible on
0.0.0.0:3000.
- Streams video via WebRTC into a canvas with continuous frame
rendering.
- Fullscreen and pointer lock support with optional keyboard lock for
navigation keys.
  - Room-based routing with offline and loading states.
  - Responsive 16:9 canvas and improved default layout styling.

- Chores
- Adds a multi-stage container build for efficient runtime images and a
lightweight init process.
  - Includes configuration and project setup for the standalone package.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DatCaptainHorse <datcaptainhorse@users.noreply.github.com>
2025-08-24 16:13:07 +03:00

20 lines
563 B
Docker

FROM docker.io/node:24-alpine AS base
FROM base AS build
WORKDIR /usr/src/app
COPY package.json ./
COPY patches ./patches
COPY packages/input ./packages/input
COPY packages/play-standalone ./packages/play-standalone
RUN cd packages/play-standalone && npm install && npm run build
FROM base AS runner
WORKDIR /www
COPY --from=build /usr/src/app/packages/play-standalone/dist ./dist
COPY --from=build /usr/src/app/node_modules ./node_modules
RUN apk add --no-cache tini
EXPOSE 3000
WORKDIR /www
ENTRYPOINT ["/sbin/tini", "--", "node", "./dist/server/entry.mjs"]