Merge pull request #259 from outis1one/claude/drum-game-service-sync-twnt5n
Sync drum-rhythm-game service with upstream's Docker deployment
This commit is contained in:
@@ -191,7 +191,7 @@ install_drum-rhythm-game() {
|
|||||||
if [ "$DRY_RUN" = true ]; then
|
if [ "$DRY_RUN" = true ]; then
|
||||||
echo "[DRY-RUN] drum-rhythm-game would:"
|
echo "[DRY-RUN] drum-rhythm-game would:"
|
||||||
echo " - Clone $REPO_URL to $DRUM_DIR/html"
|
echo " - Clone $REPO_URL to $DRUM_DIR/html"
|
||||||
echo " - Serve index.html via nginx on port 8096"
|
echo " - Build the repo's own Dockerfile (nginx, gzip, /healthz) on port 8096"
|
||||||
echo " - Offer Authelia SSO protection via Caddy (no built-in auth)"
|
echo " - Offer Authelia SSO protection via Caddy (no built-in auth)"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -236,12 +236,11 @@ name: drum-rhythm-game
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
drum-rhythm-game:
|
drum-rhythm-game:
|
||||||
image: nginx:alpine
|
build:
|
||||||
|
context: ./html
|
||||||
container_name: drum-rhythm-game
|
container_name: drum-rhythm-game
|
||||||
hostname: drum-rhythm-game
|
hostname: drum-rhythm-game
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
|
||||||
- ./html:/usr/share/nginx/html:ro
|
|
||||||
ports:
|
ports:
|
||||||
- "8096:80"
|
- "8096:80"
|
||||||
${_CADDY_NET_BLOCK}${_CADDY_NET_SECTION}
|
${_CADDY_NET_BLOCK}${_CADDY_NET_SECTION}
|
||||||
@@ -266,9 +265,19 @@ DRUM_ENV
|
|||||||
write_readme "$DRUM_DIR" << 'MD'
|
write_readme "$DRUM_DIR" << 'MD'
|
||||||
# Drum Rhythm Game
|
# Drum Rhythm Game
|
||||||
|
|
||||||
Browser-based drum rhythm game — 124 synthesized orchestra pieces across
|
Browser-based drum rhythm game — 18 genres covering 119 synth-orchestra
|
||||||
18 genres, 120 drum patterns. Supports keyboard and USB drum controllers.
|
songs (nursery rhymes, sea shanties, Christmas, folk, spirituals, world,
|
||||||
No server required; all audio synthesized in-browser via Web Audio API.
|
ragtime, classical, video game themes, chiptune originals) plus 120 drum
|
||||||
|
beat patterns across 8 genres (rock, metal, jazz, hip hop, funk, latin,
|
||||||
|
electronic, country). Supports keyboard, Wii/Xbox/PS Rock Band drums,
|
||||||
|
Guitar Hero drums, or any USB gamepad via the in-game Remap Pads button.
|
||||||
|
Multiplayer take-turns mode, adjustable speed/volume, and a leaderboard —
|
||||||
|
all state lives in browser localStorage. No server required; all audio is
|
||||||
|
synthesized in-browser via the Web Audio API.
|
||||||
|
|
||||||
|
Built and served from the repo's own `Dockerfile` (nginx + gzip + a
|
||||||
|
`/healthz` endpoint) — only `index.html` ends up in the image, so the
|
||||||
|
repo's docs/license/dev files never get served.
|
||||||
|
|
||||||
Source: https://github.com/outis1one/drum-rhythm-game
|
Source: https://github.com/outis1one/drum-rhythm-game
|
||||||
|
|
||||||
@@ -287,22 +296,22 @@ docker compose logs -f # logs
|
|||||||
```bash
|
```bash
|
||||||
cd ~/docker/drum-rhythm-game
|
cd ~/docker/drum-rhythm-game
|
||||||
git -C html pull
|
git -C html pull
|
||||||
docker compose restart
|
docker compose up -d --build
|
||||||
```
|
```
|
||||||
MD
|
MD
|
||||||
|
|
||||||
local START_DRUM=""
|
local START_DRUM=""
|
||||||
prompt_yn "Start drum-rhythm-game now? (y/n):" "y" START_DRUM
|
prompt_yn "Start drum-rhythm-game now? (y/n):" "y" START_DRUM
|
||||||
if [ "$START_DRUM" = "y" ] || [ "$START_DRUM" = "Y" ]; then
|
if [ "$START_DRUM" = "y" ] || [ "$START_DRUM" = "Y" ]; then
|
||||||
docker compose up -d \
|
docker compose up -d --build \
|
||||||
&& log_success "Drum Rhythm Game started — http://localhost:8096" \
|
&& log_success "Drum Rhythm Game started — http://localhost:8096" \
|
||||||
|| log_warning "Start failed — check: docker compose logs"
|
|| log_warning "Start failed — check: docker compose logs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " URL: http://localhost:8096"
|
echo " URL: http://localhost:8096"
|
||||||
echo " Controls: keyboard or USB drum controller"
|
echo " Controls: keyboard, USB Rock Band/Guitar Hero drums, or any USB gamepad (Remap Pads in-game)"
|
||||||
echo " Update: git -C $DRUM_DIR/html pull && docker compose -f $DRUM_DIR/docker-compose.yml restart"
|
echo " Update: git -C $DRUM_DIR/html pull && docker compose -f $DRUM_DIR/docker-compose.yml up -d --build"
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user