koel / docker

A minimal docker image for the koel music streaming server.
https://hub.docker.com/r/phanan/koel/
MIT License
166 stars 54 forks source link

docker exec --user www-data -it koel-koel-1 php artisan koel:init --no-assets throws: Migrating database fails #185

Closed dmuiX closed 9 months ago

dmuiX commented 9 months ago

running docker exec --user www-data -it koel-koel-1 php artisan koel:init --no-assets shows:

************************************
*     KOEL INSTALLATION WIZARD     *
************************************

As a reminder, you can always install/upgrade manually following the guide at https://docs.koel.dev

  Clearing caches ........................................................................................................................ 11ms DONE
  Copying .env file ....................................................................................................................... 1ms DONE
  Generating app key ...................................................................................................................... 2ms DONE

   INFO  Using app key: base64:062whcvSA...

  Migrating database .................................................................................................................... 594ms FAIL
   ERROR  Oops! Koel installation or upgrade didn't finish successfully.

   ERROR  Please check the error log at storage/logs/laravel.log and try again.

   ERROR  You can also visit https://docs.koel.dev for other options.

   ERROR  😥 Sorry for this. You deserve better.

my docker-compose:

version: '3'
services:
  koel:
    image: phanan/koel
    depends_on:
      - database
    ports:
      - 1340:80
    env_file: koel.env
    volumes:
      - /srv/mergerfs/NAS/Music:/music
      - ./covers:/var/www/html/public/img/covers
      - ./search_index:/var/www/html/storage/search-indexes

  database:
    image: postgres:16
    volumes:
      - ./db:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=${DB_DATABASE}
      - POSTGRES_USER=${DB_USERNAME}
      - POSTGRES_PASSWORD=${DB_PASSWORD}
    env_file: koel.env

volumes:
  db:
    driver: local
  music:
    driver: local
  covers:
    driver: local
  search_index:
    driver: local
dmuiX commented 9 months ago

Seems like using ./db does not but using db works.

alikhabazian commented 1 month ago

So, How can I save this in my local folder?

alikhabazian commented 1 month ago

It works for me when I use driver: local for every thing instead of ./data/music ./data/db and etc

dmuiX commented 3 weeks ago

What do you want to use in your local folder?