From 785e6c71a52785d5fd26c7e4f4a984fbbbd12645 Mon Sep 17 00:00:00 2001 From: An Phan Date: Mon, 10 Aug 2026 22:23:44 +0200 Subject: [PATCH] repair the public/storage symlink shipped in the release tarball MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The koel release archive contains public/storage as an absolute symlink into the path the release runner built at, so it resolves nowhere in the container and koel cannot read or write uploaded images — koel:doctor reports the image storage directory as unwritable. Laravel's storage:link cannot repair it either: file_exists() is false for a dangling link, so the command tries to create one and fails on the existing path. Replace it at build time with a relative link to the same target, and assert both it and the image directory in the goss suite. --- Dockerfile | 4 ++++ goss.yaml | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/Dockerfile b/Dockerfile index 962a7c3..c9e45ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -102,6 +102,10 @@ RUN a2enmod rewrite # Copy the downloaded release RUN cp -R /tmp/koel/. /var/www/html \ && mv /var/www/html/public/manifest.json.example /var/www/html/public/manifest.json \ + # The release tarball ships public/storage as an absolute symlink into the path the + # release runner built it at, which resolves nowhere here and leaves koel unable to read + # or write uploaded images. Replace it with a relative link to the same target. + && ln -sfn ../storage/app/public /var/www/html/public/storage \ && chown -R www-data:www-data /var/www/html # Volumes for the music files, image storage, and search index diff --git a/goss.yaml b/goss.yaml index f69bffc..832c37a 100644 --- a/goss.yaml +++ b/goss.yaml @@ -84,6 +84,16 @@ file: owner: www-data group: www-data filetype: directory + /var/www/html/storage/app/public/images: + exists: true + mode: "0755" + owner: www-data + group: www-data + filetype: directory + /var/www/html/public/storage: + exists: true + filetype: symlink + linked-to: ../storage/app/public package: ffmpeg: installed: true