A WebSocket-based demo app with Dockerfile & simple CI/CD that push to GitHub Container Registry (ghcr.io).
| Server | Client | UI |
|---|---|---|
![]() |
![]() |
![]() |
- Node.js 25+ installed
npm installnpm run serverServer will start on http://localhost:8080
# Set environment variables for client
export SERVER_URL=ws://localhost:8080
export CLIENT_NAME="Your Name"
export CLIENT_LOCATION="Your City"
npm run clientdocker build -t websocket-app .docker run -d \
-p 8080:8080 \
-e MODE=server \
--name ws-server \
websocket-appAccess dashboard at http://localhost:8080
docker run -d \
-e MODE=client \
-e SERVER_URL=ws://YOUR_SERVER_IP:8080 \
-e CLIENT_NAME="Your Name" \
-e CLIENT_LOCATION="Your City" \
--name ws-client \
websocket-app| Variable | Default | Description | Used By |
|---|---|---|---|
MODE |
server |
Run mode: server or client |
Both |
PORT |
8080 |
Server port | Server |
SERVER_URL |
ws://localhost:8080 |
WebSocket server URL | Client |
CLIENT_NAME |
Anonymous |
Client display name | Client |
CLIENT_LOCATION |
Unknown |
Client location | Client |


