From 28d6d8faf4f9543e5309761d29427f9bb71b5414 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 02:19:23 +0000 Subject: [PATCH] Fix pressbooks.sh: docker compose up never ran after a successful build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "if ! docker compose build && docker compose up -d" only negates the build command's exit status, so on a normal successful build the whole &&-chain short-circuited false and docker compose up -d never executed — no containers started, no pressbooks_net network created, so every following wp-cli call ("docker run --network pressbooks_net ...") failed with "network pressbooks_net not found". Split into two separate checks. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01P1Xynq3mBwtH45f8bTDfta --- services/pressbooks.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/pressbooks.sh b/services/pressbooks.sh index 9008ee0..54b3f5d 100644 --- a/services/pressbooks.sh +++ b/services/pressbooks.sh @@ -641,8 +641,12 @@ PBENV log_success "Pressbooks configured at $DIR (port $WEB_PORT)" log_info "Building image (first build downloads PrinceXML and cover-generator packages — can take a few minutes)..." - if ! docker compose build && docker compose up -d; then - log_error "Failed to build/start — check: docker compose logs" + if ! docker compose build; then + log_error "Image build failed — check the output above." + return 1 + fi + if ! docker compose up -d; then + log_error "Failed to start — check: docker compose logs" return 1 fi