[GH-ISSUE #1372] Docker Setup #787

Closed
opened 2026-02-26 02:34:16 +03:00 by kerem · 2 comments
Owner

Originally created by @sylphrena0 on GitHub (Oct 23, 2021).
Original GitHub issue: https://github.com/koel/koel/issues/1372

I'm having a ton of trouble setting up koel with docker. I'm using this config:


services:
  koel:
    image: 0xcaff/koel
    depends_on:
      - database
    ports:
      - 85:8000
    environment:
      DB_CONNECTION: mysql
      DB_HOST: database
      DB_USERNAME: koel
      DB_PASSWORD: koel
      DB_DATABASE: koel
    volumes:
      - music:/music
      - covers:/var/www/html/public/img/covers

  database:
    image: mysql/mysql-server:5.7
    volumes:
      - db:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: koel
      MYSQL_USER: koel
      MYSQL_PASSWORD: koel

volumes:
  db:
    driver: local

  music:
    driver: local

  covers:
    driver: local

When I bash into the container and run the server, I cannot access the interface:

root@41fad8d34e6c:/var/www/html# php artisan koel:init
Attempting to install or upgrade Koel.
Remember, you can always install/upgrade manually following the guide here:
📙  https://koel.phanan.net/docs

App key exists -- skipping
Generating JWT secret
Migrating database
Let's create the admin account.

 Your name:
 > [myname]

 Your email address:
 > [username]

 Your desired password:
 >

 Again, just to make sure:
 >

Seeding initial data
The absolute path to your media directory. If this is skipped (left blank) now,                                                                                                              you can set it later via the web interface.

 Media path []:
 >

Compiling front-end stuff
sh: 1: yarn: not found

🎆  Success! Koel can now be run from localhost with `php artisan serve`.
Again, for more configuration guidance, refer to
📙  https://koel.phanan.net/docs
or open the .env file in the root installation folder.
Thanks for using Koel. You rock!
root@41fad8d34e6c:/var/www/html# php artisan serve
Laravel development server started: <http://127.0.0.1:8000>

I have my proxy exposing port 85 to the web (which directs to port 8000 in the container). This yields a 502 page (there is nothing found at this port).

Is this a stupid port error? I've tried every other docker container but kept on running into errors with the database. I can't for the life of me figure out the issue

Originally created by @sylphrena0 on GitHub (Oct 23, 2021). Original GitHub issue: https://github.com/koel/koel/issues/1372 I'm having a ton of trouble setting up koel with docker. I'm using this config: ```version: '3.4' services: koel: image: 0xcaff/koel depends_on: - database ports: - 85:8000 environment: DB_CONNECTION: mysql DB_HOST: database DB_USERNAME: koel DB_PASSWORD: koel DB_DATABASE: koel volumes: - music:/music - covers:/var/www/html/public/img/covers database: image: mysql/mysql-server:5.7 volumes: - db:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: koel MYSQL_USER: koel MYSQL_PASSWORD: koel volumes: db: driver: local music: driver: local covers: driver: local ``` When I bash into the container and run the server, I cannot access the interface: ``` root@41fad8d34e6c:/var/www/html# php artisan koel:init Attempting to install or upgrade Koel. Remember, you can always install/upgrade manually following the guide here: 📙 https://koel.phanan.net/docs App key exists -- skipping Generating JWT secret Migrating database Let's create the admin account. Your name: > [myname] Your email address: > [username] Your desired password: > Again, just to make sure: > Seeding initial data The absolute path to your media directory. If this is skipped (left blank) now, you can set it later via the web interface. Media path []: > Compiling front-end stuff sh: 1: yarn: not found 🎆 Success! Koel can now be run from localhost with `php artisan serve`. Again, for more configuration guidance, refer to 📙 https://koel.phanan.net/docs or open the .env file in the root installation folder. Thanks for using Koel. You rock! root@41fad8d34e6c:/var/www/html# php artisan serve Laravel development server started: <http://127.0.0.1:8000> ``` I have my proxy exposing port 85 to the web (which directs to port 8000 in the container). This yields a 502 page (there is nothing found at this port). Is this a stupid port error? I've tried every other docker container but kept on running into errors with the database. I can't for the life of me figure out the issue
kerem closed this issue 2026-02-26 02:34:16 +03:00
Author
Owner

@pandalanax commented on GitHub (Dec 6, 2021):

i remember having issues with 0xcaff/koel, switched to hyzual/koel and it worked fine.

<!-- gh-comment-id:986631427 --> @pandalanax commented on GitHub (Dec 6, 2021): i remember having issues with `0xcaff/koel`, switched to `hyzual/koel` and it worked fine.
Author
Owner

@phanan commented on GitHub (Dec 6, 2021):

Indeed. Please consider using Koel's official docker image (maintained by @Hyzual himself) instead.

<!-- gh-comment-id:986905668 --> @phanan commented on GitHub (Dec 6, 2021): Indeed. Please consider using Koel's [official docker image](https://github.com/koel/docker) (maintained by @Hyzual himself) instead.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#787
No description provided.