Initial commit: CTmine-client (ContainerMine Client)

Docker-WebApp, die einen echten Minecraft Java-Client (Prism Launcher)
in einem Container mit virtuellem Display betreibt und per noVNC im
Browser anzeigt. Gedacht, um Accounts AFK an Farmen zu stellen.

- Multi-Stage Dockerfile: Vite/Vue-Build + Ubuntu-Runtime (Xvfb, x11vnc,
  websockify, noVNC, openbox, nginx, Prism Launcher 11.0.3)
- Vue 3 + Vite + TypeScript Dashboard (noVNC-iframe, Start/Stop,
  Status-Anzeige, Schnellstart-Anleitung)
- Node-Status-API ohne externe Dependencies (/api/status, /api/mc/*)
- docker-compose.yml mit PUID/PGID, konfigurierbarer Auflösung, shm_size
- Persistente Accounts/Instanzen in /config (Volume)
This commit is contained in:
Tronax 2026-08-08 21:08:51 +02:00
commit b8a99e6e9e
Signed by: Tronax
SSH key fingerprint: SHA256:2pKKXDZucWvaF/GzXNz0FY53EAO1YDLN80bqS+TTz/o
25 changed files with 1766 additions and 0 deletions

79
docker/supervisor.conf Normal file
View file

@ -0,0 +1,79 @@
; CTmine-client — Haupt-Supervisor-Konfiguration.
; supervisord läuft als ROOT, damit es /dev/fd/1 (Container-stdout) nutzen und
; die Programme sauber verwalten kann. Jedes Programm startet seinen Prozess
; selbst als ctmine-Benutzer (per gosu), so dass die eigentliche Arbeit nie
; als root läuft.
;
; Die Xvfb- und x11vnc-Programmblöcke werden vom entrypoint.sh als
; /tmp/xvfb.conf und /tmp/x11vnc.conf generiert (wegen ENV-Substitution)
; und hier per include gezogen.
[supervisord]
nodaemon=true
user=root
logfile=/dev/null
logfile_maxbytes=0
pidfile=/var/run/supervisord.pid
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
; Von entrypoint.sh generierte Programmblöcke (Xvfb, x11vnc):
[include]
files = /tmp/xvfb.conf /tmp/x11vnc.conf
; --- Windowmanager (sonst hat MC keinen Rahmen / Fokus) -------------------
[program:openbox]
command=/usr/sbin/gosu ctmine /usr/bin/openbox
environment=DISPLAY=":0"
priority=30
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0
; --- websockify: VNC :5900 → WebSocket, von nginx unter /websockify exposed -
[program:websockify]
command=/usr/sbin/gosu ctmine /usr/bin/python3 -m websockify 0.0.0.0:6080 localhost:5900 --web=/usr/share/novnc
priority=40
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0
; --- Node Status-/Steuerungs-API ------------------------------------------
[program:mc-api]
command=/usr/sbin/gosu ctmine /usr/bin/node /app/mc-api/server.js
directory=/app/mc-api
environment=DISPLAY=":0",HOME="/config",NODE_ENV="production"
priority=50
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0
; --- nginx: liefert Vue-Dashboard + proxyt /api und /websockify -----------
; nginx muss als root starten (Port-Bind + Config), wechselt intern per
; 'user ctmine;' in der nginx.conf in den Worker-Prozessen.
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
priority=60
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0