Update docker-compose.mysql.yml by Tontonjo · Pull Request #224 · koel/docker · GitHub
Skip to content

Update docker-compose.mysql.yml - #224

Open
Tontonjo wants to merge 1 commit into
koel:masterfrom
Tontonjo:patch-2
Open

Tontonjo wants to merge 1 commit into
koel:masterfrom
Tontonjo:patch-2

Conversation

@Tontonjo

@Tontonjo Tontonjo commented Jun 8, 2026 •

Copy link
Copy Markdown

Corrected path in container to match what Koel is expecting as mountpoint:
koel:doctor
Image storage directory public/storage/images is not readable/writable ERROR

Summary by CodeRabbit

  • Chores
    • Updated image storage directory configuration to optimize file organization and serving within the application environment.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docker-compose.mysql.yml`:
- Line 16: The compose mount uses the wrong target path causing Koel to
read/write images in the wrong place; update the volume mapping for
image_storage so it mounts to Koel’s internal storage path
/var/www/html/storage/app/public/images (replace the current
/var/www/html/public/storage/images target), ensuring the image_storage volume
name remains unchanged and the service that declares this volume continues to
reference image_storage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a0e0c32e-5495-407a-8ce6-cad20a994179

📥 Commits

Reviewing files that changed from the base of the PR and between 17e4c70 and 3e6641b.

📒 Files selected for processing (1)
  • docker-compose.mysql.yml

Comment thread docker-compose.mysql.yml
volumes:
- music:/music
- image_storage:/var/www/html/storage/app/public/images
- image_storage:/var/www/html/public/storage/images

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Restore the image_storage mount target to Koel’s internal storage path.

This change points the volume to /var/www/html/public/storage/images, but the image and init flow persist/read images at /var/www/html/storage/app/public/images. Mounting the wrong target breaks the storage contract and can cause unreadable/unwritable image storage or lost persistence behavior after init/migrations.

Suggested fix
-      - image_storage:/var/www/html/public/storage/images
+      - image_storage:/var/www/html/storage/app/public/images

Based on learnings: Dockerfile creates/declares /var/www/html/storage/app/public/images as the image-storage volume path, and CHANGELOG documents this exact compose mount target for upgrades.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- image_storage:/var/www/html/public/storage/images
- image_storage:/var/www/html/storage/app/public/images
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose.mysql.yml` at line 16, The compose mount uses the wrong target
path causing Koel to read/write images in the wrong place; update the volume
mapping for image_storage so it mounts to Koel’s internal storage path
/var/www/html/storage/app/public/images (replace the current
/var/www/html/public/storage/images target), ensuring the image_storage volume
name remains unchanged and the service that declares this volume continues to
reference image_storage.

@phanan

phanan commented Aug 10, 2026

Copy link
Copy Markdown
Member

Thanks for reporting this — you found a real bug, and it turned out to be worse than the compose file.

koel's release archive ships public/storage as an absolute symlink into the directory the release runner built in:

koel/public/storage -> /home/runner/work/koel/koel/storage/app/public

That resolves nowhere in the container, so koel can neither read nor write uploaded images and koel:doctor reports exactly the error you saw. It affects every Docker image and every standalone tarball install, not only the mysql compose setup. koel:init cannot repair it either: storage:link checks file_exists(), which is false for a dangling symlink, so it tries to create one and fails on the path already there.

Fixed in #229 by repairing the link at build time, which covers all three compose files and any hand-rolled docker run, and keeps images in the volume the VOLUME declaration already points at — so existing installations don't lose theirs. The root cause is fixed in koel/koel#2644 so future releases ship a portable archive.

Closing this in favour of #229. Thank you for the report.

@phanan

phanan commented Aug 10, 2026

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants