Open Serph91P opened 3 months ago
If I connect without a user and run the command, it runs fine?
root@b97b9bfd39ee:/var/www/html# php artisan koel:init --no-assets
************************************
* KOEL INSTALLATION WIZARD *
************************************
As a reminder, you can always install/upgrade manually following the guide at https://docs.koel.dev
Clearing caches ..................................................................................................... 5ms DONE
.env file exists -- skipping ............................................................................................ DONE
Retrieving app key .................................................................................................. 0ms DONE
Using app key: base64:uE4kX7J5V.. ....................................................................................... DONE
Migrating database ................................................................................................ 631ms DONE
Creating default admin account ..................................................................................... 56ms DONE
Seeding data ...................................................................................................... 125ms DONE
The absolute path to your media directory. You can leave it blank and set it later via the web interface.
If you plan to use Koel with a cloud provider (S3 or Dropbox), you can also skip this.
Media path [/music]:
> /music
INFO Trying to install Koel scheduler….
INFO Koel scheduler installed successfully.
[OK] All done!
Koel can now be run from localhost with `php artisan serve`.
Log in with email admin@koel.dev and password KoelIsCool
Again, visit 📙 https://docs.koel.dev for more tips and tweaks.
Feeling generous and want to support Koel’s development? Check out https://github.com/users/phanan/sponsorship 🤗
Thanks for using Koel. You rock! 🤘
But the error with the access to the database remains.
Fix for your compose:
services:
koel:
image: phanan/koel
container_name: koel
depends_on:
- database
ports:
- 8181:80
environment:
- DB_CONNECTION=pgsql
- DB_HOST=koel-database
- DB_PORT=5432
- DB_USERNAME=koel
- DB_PASSWORD=password
- DB_DATABASE=koel
- APP_KEY=appkey
volumes:
# - /mnt/user/data/media/koel-music:/music
# - /mnt/cache/appdata/koel/covers:/var/www/html/public/img/covers
# - /mnt/cache/appdata/koel/search_index:/var/www/html/storage/search-indexes
- music:/music
- covers:/var/www/html/public/img/covers
- search_index:/var/www/html/storage/search-indexes
networks:
- koel-network
database:
image: postgres:13
container_name: koel-database
volumes:
# - /mnt/cache/appdata/koel/db:/var/lib/postgresql/data
- db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=koel
- POSTGRES_USER=koel
- POSTGRES_PASSWORD=password
networks:
- koel-network
networks:
koel-network:
driver: bridge
# Add following
volumes:
music:
driver: local
driver_opts:
o: bind
type: none
device: /mnt/user/data/media/koel-music
covers:
driver: local
driver_opts:
o: bind
type: none
device: /mnt/cache/appdata/koel/covers
search_index:
driver: local
driver_opts:
o: bind
type: none
device: /mnt/cache/appdata/koel/search_index
db:
driver: local
driver_opts:
o: bind
type: none
device: /mnt/cache/appdata/koel/db
Fix for your compose:
services: koel: image: phanan/koel container_name: koel depends_on: - database ports: - 8181:80 environment: - DB_CONNECTION=pgsql - DB_HOST=koel-database - DB_PORT=5432 - DB_USERNAME=koel - DB_PASSWORD=password - DB_DATABASE=koel - APP_KEY=appkey volumes: # - /mnt/user/data/media/koel-music:/music # - /mnt/cache/appdata/koel/covers:/var/www/html/public/img/covers # - /mnt/cache/appdata/koel/search_index:/var/www/html/storage/search-indexes - music:/music - covers:/var/www/html/public/img/covers - search_index:/var/www/html/storage/search-indexes networks: - koel-network database: image: postgres:13 container_name: koel-database volumes: # - /mnt/cache/appdata/koel/db:/var/lib/postgresql/data - db:/var/lib/postgresql/data environment: - POSTGRES_DB=koel - POSTGRES_USER=koel - POSTGRES_PASSWORD=password networks: - koel-network networks: koel-network: driver: bridge # Add following volumes: music: driver: local driver_opts: o: bind type: none device: /mnt/user/data/media/koel-music covers: driver: local driver_opts: o: bind type: none device: /mnt/cache/appdata/koel/covers search_index: driver: local driver_opts: o: bind type: none device: /mnt/cache/appdata/koel/search_index db: driver: local driver_opts: o: bind type: none device: /mnt/cache/appdata/koel/db
you changed my bindings to volumes but how does that fix my problem?
It looks like a permission issue. Adding +w on directories solved this for me.
After this https://github.com/koel/koel/issues/1811 I setup the container on another server. Accesssed the docker like this:
docker exec --user www-data -it koel bash
Tried to runphp artisan koel:init --no-assets
command but it fails because it cannot migrate. After looking at the logs it says it cannot open the database file and its using the sqliteEngine? System is running Unraid with docker-compose.docker-compose.yml:
Logs: