From 12a60b9cbf9bc36bb9be56db6191106709ca6a10 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Sat, 28 Oct 2023 08:31:35 +1300 Subject: [PATCH] Upgrading docker compose with healtcheck - Snapserver must wait until Mopidy is up and running before starting - This ensures mpd accepts snapserver connection for snapserver controls --- docker-compose.example.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docker-compose.example.yml b/docker-compose.example.yml index 6d5e39ff7..8568d2871 100755 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -2,10 +2,13 @@ version: "3" services: snapserver: image: jaedb/snapserver + depends_on: + mopidy: + condition: service_healthy ports: - - 1704:1704 - - 1705:1705 - - 1780:1780 + - 1704 + - 1705 + - 1780 volumes: - /tmp/snapserver:/tmp - ./docker/snapserver/snapserver.conf:/etc/snapserver.conf @@ -16,11 +19,9 @@ services: - PIP_PACKAGES=Mopidy-YTMusic Mopidy-Tidal Mopidy-SoundCloud Mopidy-MusicBox-Webclient build: context: . - depends_on: - - snapserver ports: - - 6600:6600 - - 6680:6680 + - 6600 + - 6680 volumes: # - ./mopidy/iris:/iris/mopidy/iris # To use a locally-built UI - ./docker/mopidy/iris:/var/lib/mopidy/iris # Iris-specific storage