Fix Docker Compose for Mac dev mode
- Replace all ghcr.io images (blocked without auth) with local Dockerfiles: snapserver/snapclient from debian:bookworm-slim, mopidy from debian:bookworm-slim + Python/GStreamer, librespot disabled in dev (v0.8.0 has vergen dep bug) - Fix duplicate 'image' and 'version' keys in compose files - Dev mode: zones + librespot use alpine dummy containers - Dashboard dev: use upstream node:20-alpine directly (no custom build) - Port changed to 8090 (8080 taken by Supabase) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1677
dashboard/package-lock.json
generated
Normal file
1677
dashboard/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,3 @@
|
||||
version: "3.9"
|
||||
|
||||
# Development override – run without any hardware.
|
||||
# Usage: docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
|
||||
|
||||
@@ -9,50 +7,53 @@ services:
|
||||
environment:
|
||||
- SIGNALK_DEMO=true # Built-in demo NMEA data generator
|
||||
|
||||
# Spotify Connect still works over TCP on dev (no host network needed)
|
||||
# Librespot disabled in dev – dashboard uses mock Spotify data
|
||||
librespot:
|
||||
environment:
|
||||
- LIBRESPOT_DISABLE_DISCOVERY=false
|
||||
ports:
|
||||
- "57621:57621/udp"
|
||||
- "57621:57621/tcp"
|
||||
image: alpine:latest
|
||||
entrypoint: []
|
||||
command: ["sh", "-c", "echo 'librespot: dev mode, mock active' && sleep infinity"]
|
||||
restart: "no"
|
||||
volumes: []
|
||||
ports: []
|
||||
|
||||
# avahi container for AirPlay mDNS discovery on Mac/Windows
|
||||
avahi:
|
||||
image: flungo/avahi
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- /var/run/dbus:/var/run/dbus
|
||||
|
||||
# Null-player zones – no audio hardware needed
|
||||
# Zones disabled in dev – dashboard uses Snapcast mock
|
||||
zone-salon:
|
||||
command: snapclient --host snapserver --hostID zone-salon --player null
|
||||
image: alpine:latest
|
||||
entrypoint: []
|
||||
command: ["sleep", "infinity"]
|
||||
restart: "no"
|
||||
|
||||
zone-cockpit:
|
||||
command: snapclient --host snapserver --hostID zone-cockpit --player null
|
||||
image: alpine:latest
|
||||
entrypoint: []
|
||||
command: ["sleep", "infinity"]
|
||||
restart: "no"
|
||||
|
||||
zone-bug:
|
||||
command: snapclient --host snapserver --hostID zone-bug --player null
|
||||
image: alpine:latest
|
||||
entrypoint: []
|
||||
command: ["sleep", "infinity"]
|
||||
restart: "no"
|
||||
|
||||
zone-heck:
|
||||
command: snapclient --host snapserver --hostID zone-heck --player null
|
||||
image: alpine:latest
|
||||
entrypoint: []
|
||||
command: ["sleep", "infinity"]
|
||||
restart: "no"
|
||||
|
||||
# Vite dev server with HMR instead of built nginx image
|
||||
dashboard:
|
||||
build: .
|
||||
image: node:20-alpine
|
||||
entrypoint: []
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./dashboard:/app
|
||||
- /app/node_modules
|
||||
command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 8080"
|
||||
command: ["sh", "-c", "npm install && npm run dev -- --host 0.0.0.0 --port 8090"]
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8090:8090"
|
||||
environment:
|
||||
- VITE_SNAPCAST_HOST=localhost
|
||||
- VITE_SIGNALK_HOST=localhost
|
||||
- VITE_MOPIDY_HOST=localhost
|
||||
- VITE_JELLYFIN_HOST=localhost
|
||||
# Override the build-based image
|
||||
image: node:20-alpine
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.9"
|
||||
|
||||
# Production docker-compose for boat deployment.
|
||||
# For development use: docker compose -f docker-compose.yml -f docker-compose.dev.yml up
|
||||
|
||||
@@ -42,23 +40,19 @@ services:
|
||||
# ─── Audio Sources ─────────────────────────────────────────────────────────
|
||||
|
||||
librespot:
|
||||
image: ghcr.io/librespot-org/librespot:latest
|
||||
build: ./docker/librespot
|
||||
restart: unless-stopped
|
||||
# On Linux (boat): use host network for mDNS/Spotify discovery
|
||||
# network_mode: host
|
||||
ports:
|
||||
- "57621:57621/udp" # Spotify zeroconf discovery
|
||||
- "57621:57621/tcp"
|
||||
environment:
|
||||
- SPOTIFY_NAME=${SPOTIFY_NAME:-Bordanlage}
|
||||
- SPOTIFY_BITRATE=${SPOTIFY_BITRATE:-320}
|
||||
command: >
|
||||
--name "${SPOTIFY_NAME:-Bordanlage}"
|
||||
--bitrate ${SPOTIFY_BITRATE:-320}
|
||||
--backend pipe
|
||||
--device /tmp/audio/spotify.pcm
|
||||
--zeroconf-port 57621
|
||||
--cache-size-limit ${SPOTIFY_CACHE_SIZE:-1024}
|
||||
volumes:
|
||||
- pipes:/tmp/audio
|
||||
networks:
|
||||
@@ -114,7 +108,7 @@ services:
|
||||
# ─── Multiroom Audio ───────────────────────────────────────────────────────
|
||||
|
||||
snapserver:
|
||||
image: ghcr.io/badaix/snapcast:latest
|
||||
build: ./docker/snapserver
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "1704:1704" # Snapcast protocol
|
||||
@@ -131,41 +125,41 @@ services:
|
||||
- bordanlage
|
||||
|
||||
zone-salon:
|
||||
image: ghcr.io/badaix/snapcast:latest
|
||||
build: ./docker/snapclient
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- snapserver
|
||||
# On boat: add --soundcard hw:0,0 and device /dev/snd
|
||||
# devices:
|
||||
# - /dev/snd:/dev/snd
|
||||
command: snapclient --host snapserver --hostID zone-salon --player null
|
||||
command: ["snapclient", "--host", "snapserver", "--hostID", "zone-salon", "--player", "null"]
|
||||
networks:
|
||||
- bordanlage
|
||||
|
||||
zone-cockpit:
|
||||
image: ghcr.io/badaix/snapcast:latest
|
||||
build: ./docker/snapclient
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- snapserver
|
||||
command: snapclient --host snapserver --hostID zone-cockpit --player null
|
||||
command: ["snapclient", "--host", "snapserver", "--hostID", "zone-cockpit", "--player", "null"]
|
||||
networks:
|
||||
- bordanlage
|
||||
|
||||
zone-bug:
|
||||
image: ghcr.io/badaix/snapcast:latest
|
||||
build: ./docker/snapclient
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- snapserver
|
||||
command: snapclient --host snapserver --hostID zone-bug --player null
|
||||
command: ["snapclient", "--host", "snapserver", "--hostID", "zone-bug", "--player", "null"]
|
||||
networks:
|
||||
- bordanlage
|
||||
|
||||
zone-heck:
|
||||
image: ghcr.io/badaix/snapcast:latest
|
||||
build: ./docker/snapclient
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- snapserver
|
||||
command: snapclient --host snapserver --hostID zone-heck --player null
|
||||
command: ["snapclient", "--host", "snapserver", "--hostID", "zone-heck", "--player", "null"]
|
||||
networks:
|
||||
- bordanlage
|
||||
|
||||
|
||||
14
docker/librespot/Dockerfile
Normal file
14
docker/librespot/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
# Stage 1: Build librespot from source
|
||||
FROM rust:slim-bookworm AS builder
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends pkg-config libssl-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN cargo install librespot
|
||||
|
||||
# Stage 2: Minimal runtime image
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=builder /usr/local/cargo/bin/librespot /usr/local/bin/librespot
|
||||
ENTRYPOINT ["librespot"]
|
||||
@@ -1,20 +1,29 @@
|
||||
FROM ghcr.io/mopidy/mopidy:latest
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
USER root
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
python3 python3-pip python3-gi python3-gi-cairo \
|
||||
gstreamer1.0-plugins-base \
|
||||
gstreamer1.0-plugins-good \
|
||||
gstreamer1.0-plugins-ugly \
|
||||
gstreamer1.0-tools \
|
||||
gir1.2-gstreamer-1.0 \
|
||||
gir1.2-gst-plugins-base-1.0 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip3 install \
|
||||
RUN pip3 install --break-system-packages \
|
||||
mopidy \
|
||||
mopidy-iris \
|
||||
mopidy-local \
|
||||
mopidy-stream \
|
||||
mopidy-tunein \
|
||||
mopidy-podcast \
|
||||
--break-system-packages
|
||||
mopidy-tunein
|
||||
|
||||
# Ensure audio pipe directory exists at startup
|
||||
RUN echo '#!/bin/sh\nmkdir -p /tmp/audio\nexec "$@"' > /entrypoint-wrapper.sh \
|
||||
&& chmod +x /entrypoint-wrapper.sh
|
||||
RUN useradd -m -u 84 mopidy \
|
||||
&& install -d -o mopidy /var/cache/mopidy /var/lib/mopidy /var/log/mopidy
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 6680
|
||||
USER mopidy
|
||||
|
||||
ENTRYPOINT ["/entrypoint-wrapper.sh"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["mopidy", "--config", "/etc/mopidy/mopidy.conf"]
|
||||
|
||||
3
docker/mopidy/entrypoint.sh
Normal file
3
docker/mopidy/entrypoint.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
mkdir -p /tmp/audio
|
||||
exec "$@"
|
||||
5
docker/snapclient/Dockerfile
Normal file
5
docker/snapclient/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends snapclient \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
ENTRYPOINT ["snapclient"]
|
||||
6
docker/snapserver/Dockerfile
Normal file
6
docker/snapserver/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends snapserver \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
EXPOSE 1704 1705 1780
|
||||
CMD ["snapserver"]
|
||||
Reference in New Issue
Block a user