Skip to content

Conversation

@stavros-k
Copy link

@stavros-k stavros-k commented Jan 27, 2026

Closes #213

  1. [[ is a bash syntax, but shebang is sh.
  2. OPTIMIZE_CONFIG was wrapped in `, making it exectute it like it was a command.
  3. The PHP_INI_DIR, is:
    • not set in the alpine base
    • was expected to be set during the BUILD phase of the image. If you check the logs before the commit that sets it, you see the warning

@stavros-k stavros-k mentioned this pull request Jan 27, 2026
@phanan
Copy link
Member

phanan commented Jan 27, 2026

Thanks for the PR. The test is broken – can you take a look?

@stavros-k
Copy link
Author

There isnt clear what is failing, but running it locally I see in the storage logs this:

[2026-01-08 21:31:18] production.WARNING: No drop FK logic for driver sqlite  
[2026-01-08 21:31:18] production.WARNING: No drop FK logic for driver sqlite  
[2026-01-08 21:31:18] production.WARNING: No drop FK logic for driver sqlite  
[2026-01-27 18:13:03] production.ERROR: DomainException: Error when trying to read crontab : crontab: must be suid to work properly in /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabAdapter.php:80
Stack trace:
#0 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(169): TiBeN\CrontabManager\CrontabAdapter->readCrontab()
#1 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(61): TiBeN\CrontabManager\CrontabRepository->readCrontab()
#2 /var/www/html/app/Console/Commands/InstallSchedulerCommand.php(23): TiBeN\CrontabManager\CrontabRepository->__construct()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InstallSchedulerCommand->handle()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#9 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#11 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#12 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#13 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(165): Symfony\Component\Console\Application->run()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(426): Illuminate\Console\Application->call()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(363): Illuminate\Foundation\Console\Kernel->call()
#17 /var/www/html/app/Console/Commands/InitCommand.php(361): Illuminate\Support\Facades\Facade::__callStatic()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(41): App\Console\Commands\InitCommand::{closure:App\Console\Commands\InitCommand::tryInstallingScheduler():360}()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Factory.php(59): Illuminate\Console\View\Components\Task->render()
#20 /var/www/html/app/Console/Commands/InitCommand.php(360): Illuminate\Console\View\Components\Factory->__call()
#21 /var/www/html/app/Console/Commands/InitCommand.php(62): App\Console\Commands\InitCommand->tryInstallingScheduler()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InitCommand->handle()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#28 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#30 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#31 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#32 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\Component\Console\Application->run()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1235): Illuminate\Foundation\Console\Kernel->handle()
#35 /var/www/html/artisan(16): Illuminate\Foundation\Application->handleCommand()
#36 {main}  
[2026-01-27 18:13:04] production.ERROR: DomainException: Error when trying to read crontab : crontab: must be suid to work properly in /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabAdapter.php:80
Stack trace:
#0 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(169): TiBeN\CrontabManager\CrontabAdapter->readCrontab()
#1 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(61): TiBeN\CrontabManager\CrontabRepository->readCrontab()
#2 /var/www/html/app/Console/Commands/InstallSchedulerCommand.php(23): TiBeN\CrontabManager\CrontabRepository->__construct()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InstallSchedulerCommand->handle()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#9 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#11 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#12 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#13 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(165): Symfony\Component\Console\Application->run()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(426): Illuminate\Console\Application->call()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(363): Illuminate\Foundation\Console\Kernel->call()
#17 /var/www/html/app/Console/Commands/InitCommand.php(361): Illuminate\Support\Facades\Facade::__callStatic()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(41): App\Console\Commands\InitCommand::{closure:App\Console\Commands\InitCommand::tryInstallingScheduler():360}()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Factory.php(59): Illuminate\Console\View\Components\Task->render()
#20 /var/www/html/app/Console/Commands/InitCommand.php(360): Illuminate\Console\View\Components\Factory->__call()
#21 /var/www/html/app/Console/Commands/InitCommand.php(62): App\Console\Commands\InitCommand->tryInstallingScheduler()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InitCommand->handle()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#28 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#30 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#31 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#32 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\Component\Console\Application->run()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1235): Illuminate\Foundation\Console\Kernel->handle()
#35 /var/www/html/artisan(16): Illuminate\Foundation\Application->handleCommand()
#36 {main}  
[2026-01-27 18:13:06] production.ERROR: DomainException: Error when trying to read crontab : crontab: must be suid to work properly in /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabAdapter.php:80
Stack trace:
#0 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(169): TiBeN\CrontabManager\CrontabAdapter->readCrontab()
#1 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(61): TiBeN\CrontabManager\CrontabRepository->readCrontab()
#2 /var/www/html/app/Console/Commands/InstallSchedulerCommand.php(23): TiBeN\CrontabManager\CrontabRepository->__construct()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InstallSchedulerCommand->handle()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#9 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#11 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#12 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#13 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(165): Symfony\Component\Console\Application->run()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(426): Illuminate\Console\Application->call()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(363): Illuminate\Foundation\Console\Kernel->call()
#17 /var/www/html/app/Console/Commands/InitCommand.php(361): Illuminate\Support\Facades\Facade::__callStatic()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(41): App\Console\Commands\InitCommand::{closure:App\Console\Commands\InitCommand::tryInstallingScheduler():360}()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Factory.php(59): Illuminate\Console\View\Components\Task->render()
#20 /var/www/html/app/Console/Commands/InitCommand.php(360): Illuminate\Console\View\Components\Factory->__call()
#21 /var/www/html/app/Console/Commands/InitCommand.php(62): App\Console\Commands\InitCommand->tryInstallingScheduler()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InitCommand->handle()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#28 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#30 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#31 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#32 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\Component\Console\Application->run()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1235): Illuminate\Foundation\Console\Kernel->handle()
#35 /var/www/html/artisan(16): Illuminate\Foundation\Application->handleCommand()
#36 {main}  
[2026-01-27 18:13:08] production.ERROR: DomainException: Error when trying to read crontab : crontab: must be suid to work properly in /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabAdapter.php:80
Stack trace:
#0 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(169): TiBeN\CrontabManager\CrontabAdapter->readCrontab()
#1 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(61): TiBeN\CrontabManager\CrontabRepository->readCrontab()
#2 /var/www/html/app/Console/Commands/InstallSchedulerCommand.php(23): TiBeN\CrontabManager\CrontabRepository->__construct()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InstallSchedulerCommand->handle()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#9 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#11 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#12 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#13 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(165): Symfony\Component\Console\Application->run()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(426): Illuminate\Console\Application->call()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(363): Illuminate\Foundation\Console\Kernel->call()
#17 /var/www/html/app/Console/Commands/InitCommand.php(361): Illuminate\Support\Facades\Facade::__callStatic()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(41): App\Console\Commands\InitCommand::{closure:App\Console\Commands\InitCommand::tryInstallingScheduler():360}()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Factory.php(59): Illuminate\Console\View\Components\Task->render()
#20 /var/www/html/app/Console/Commands/InitCommand.php(360): Illuminate\Console\View\Components\Factory->__call()
#21 /var/www/html/app/Console/Commands/InitCommand.php(62): App\Console\Commands\InitCommand->tryInstallingScheduler()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InitCommand->handle()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#28 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#30 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#31 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#32 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\Component\Console\Application->run()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1235): Illuminate\Foundation\Console\Kernel->handle()
#35 /var/www/html/artisan(16): Illuminate\Foundation\Application->handleCommand()
#36 {main}  

And this in the stdout logs

koel-1  | Starting cron daemon...
koel-1  | Starting php-fpm...
koel-1  | [27-Jan-2026 18:13:01] NOTICE: [pool www] pm.start_servers is not set. It's been set to 2.
koel-1  | No .env file found in /var/www/html. Make sure to mount a .env file to store the configuration. You can use the koel:init command (see https://github.com/koel/docker#the-koelinit-command) for a guided setup.
koel-1  | 
koel-1  | See https://github.com/koel/koel/blob/master/.env.example for an example .env file.
koel-1  | Optimizing config...
koel-1  | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.23.0.3. Set the 'ServerName' directive globally to suppress this message
koel-1  | 
koel-1  |    INFO  Configuration cache cleared successfully.  
koel-1  | 
koel-1  | 
koel-1  |    INFO  Configuration cached successfully.  
koel-1  | 
koel-1  | Running installer...
koel-1  | 
koel-1  |                                                                                 
koel-1  |                            KOEL INSTALLATION WIZARD.                            
koel-1  |                                                                                 
koel-1  | 
koel-1  |    INFO  Remember, you can always install/upgrade manually using the guide at https://docs.koel.dev.  
koel-1  | 
koel-1  |    INFO  Running in no-interaction mode.  
koel-1  | 
koel-1  |   Clearing caches ................................................ 7.36ms DONE
koel-1  |   Copying .env file .............................................. 0.29ms DONE
koel-1  |   Retrieving app key ............................................. 0.00ms DONE
koel-1  |   Using app key: exactly-32-chara.. ..................................... DONE
koel-1  |   Migrating database ............................................. 6.90ms DONE
koel-1  |   Data already seeded -- skipping ....................................... DONE
koel-1  |   manifest.json already exists -- skipping .............................. DONE
koel-1  |   manifest-remote.json already exists -- skipping ....................... DONE
koel-1  |   Installing Koel scheduler ..................................... 11.50ms FAIL
koel-1  | 
koel-1  |    ERROR  Oops! Koel installation or upgrade didn't finish successfully.  
koel-1  | 
koel-1  |    ERROR  Please check the error log at storage/logs/laravel.log and try again.  
koel-1  | 
koel-1  |    ERROR  For further troubleshooting, visit https://docs.koel.dev/troubleshooting.  
koel-1  | 
koel-1  |    ERROR  😥 Sorry for this. You deserve better.  
koel-1  | 

It seems that it uses sqlite even tho I have pgsql configured?
Does it not read the env using something like getEnv? Does it expect variables to be set explicitly in the .env file?

@phanan
Copy link
Member

phanan commented Jan 27, 2026

Does it expect variables to be set explicitly in the .env file?

Yes.

@stavros-k
Copy link
Author

Does it expect variables to be set explicitly in the .env file?

Yes.

Well, you can pass env to containers via -e in docker run or environment: in docker compose. I dont get the reason for the .env file requirement.

@phanan
Copy link
Member

phanan commented Jan 27, 2026

Well, you can pass env to containers via -e in docker run or environment: in docker compose. I dont get the reason for the .env file requirement.

It's a Laravel thing, not Docker.

@stavros-k
Copy link
Author

Well, you can pass env to containers via -e in docker run or environment: in docker compose. I dont get the reason for the .env file requirement.

It's a Laravel thing, not Docker.

Given that Laravel's docs say

Any variable in your .env file can be overridden by external environment variables such as server-level or system-level environment variables.

Can we add an empty .env file in the /var/www/html dir, so it "works" and if a user wants to bind mount one, it should work as well.

@phanan
Copy link
Member

phanan commented Jan 27, 2026

Tests are still failing.

@stavros-k
Copy link
Author

Even after having the .env file I see these logs

[2026-01-08 21:31:18] production.WARNING: No drop FK logic for driver sqlite
[2026-01-08 21:31:18] production.WARNING: No drop FK logic for driver sqlite
[2026-01-08 21:31:18] production.WARNING: No drop FK logic for driver sqlite
[2026-01-27 18:32:37] production.ERROR: DomainException: Error when trying to read crontab : crontab: must be suid to work properly in /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabAdapter.php:80
Stack trace:
#0 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(169): TiBeN\CrontabManager\CrontabAdapter->readCrontab()
#1 /var/www/html/vendor/tiben/crontab-manager/src/CrontabManager/CrontabRepository.php(61): TiBeN\CrontabManager\CrontabRepository->readCrontab()
#2 /var/www/html/app/Console/Commands/InstallSchedulerCommand.php(23): TiBeN\CrontabManager\CrontabRepository->__construct()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InstallSchedulerCommand->handle()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#9 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#11 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#12 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#13 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Application.php(165): Symfony\Component\Console\Application->run()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(426): Illuminate\Console\Application->call()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(363): Illuminate\Foundation\Console\Kernel->call()
#17 /var/www/html/app/Console/Commands/InitCommand.php(361): Illuminate\Support\Facades\Facade::__callStatic()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(41): App\Console\Commands\InitCommand::{closure:App\Console\Commands\InitCommand::tryInstallingScheduler():360}()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/View/Components/Factory.php(59): Illuminate\Console\View\Components\Task->render()
#20 /var/www/html/app/Console/Commands/InitCommand.php(360): Illuminate\Console\View\Components\Factory->__call()
#21 /var/www/html/app/Console/Commands/InitCommand.php(62): App\Console\Commands\InitCommand->tryInstallingScheduler()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\InitCommand->handle()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::{closure:Illuminate\Container\BoundMethod::call():35}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(96): Illuminate\Container\Util::unwrapIfClosure()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(836): Illuminate\Container\BoundMethod::call()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#28 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#30 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run()
#31 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand()
#32 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\Component\Console\Application->run()
#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1235): Illuminate\Foundation\Console\Kernel->handle()
#35 /var/www/html/artisan(16): Illuminate\Foundation\Application->handleCommand()
#36 {main}
❯ docker exec -it 6961e4de2e33a22042d3e03b819b70a6-koel-1 cat .env
DB_CONNECTION=pgsql
LANGUAGE=en_US:en
USER=www-data
FFMPEG_PATH=/usr/bin/ffmpeg
HOSTNAME=79c0ad39a3e4
DB_PORT=5432
OPTIMIZE_CONFIG=true
PHP_INI_DIR=/usr/local/etc/php
SHLVL=3
HOME=/var/www/
UMASK_SET=002
DB_DATABASE=koel
DB_USERNAME=koel
LOGNAME=www-data
STREAMING_METHOD=x-sendfile
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG=en_US.UTF-8
SHELL=/bin/sh
UMASK=002
MEDIA_PATH=/music
LC_ALL=en_US.UTF-8
APP_KEY=exactly-32-characters-app-keyyyy
DB_PASSWORD=some-secret-password
PWD=/var/www/html
TZ=Etc/UTC
NVIDIA_VISIBLE_DEVICES=void
DB_HOST=postgres

@stavros-k
Copy link
Author

stavros-k commented Jan 27, 2026

I can't really dig more into it. I have no idea about neither PHP or Laravel.
But I know I have deployed many laravel apps via docker that didnt require a .env file.
One example is firely-iii.

Feel free to take it from here and do changes.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes corrections to the init script for POSIX shell compatibility and sets the PHP_INI_DIR environment variable that was previously undefined. However, it does not fully address issue #213 regarding running without a mounted .env file.

Changes:

  • Changed bash-specific [[ conditionals to POSIX-compliant [ in koel-init script
  • Fixed backtick syntax that would incorrectly execute OPTIMIZE_CONFIG as a command
  • Added PHP_INI_DIR environment variable definition in Dockerfile

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
koel-init Converted bash-specific syntax to POSIX-compliant shell syntax for sh compatibility and fixed string quoting
Dockerfile Added PHP_INI_DIR environment variable and updated php.ini COPY command syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 3 to 8
if [ ! -f /var/www/html/.env ]; then
echo "No .env file found in /var/www/html. Make sure to mount a .env file to store the configuration. You can use the koel:init command (see https://github.com/koel/docker#the-koelinit-command) for a guided setup."
echo ""
echo "See https://github.com/koel/koel/blob/master/.env.example for an example .env file."
exit 0
fi
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

This PR claims to close issue #213, which reports that the container won't run koel:init when environment variables are passed via docker-compose environment section (without mounting a .env file). However, this check still exits the script with exit 0 when the .env file is not found, preventing koel:init from running. This doesn't address the core issue described in #213. The script should either remove this check entirely or allow the script to continue when environment variables are provided through other means (e.g., checking if required environment variables are set).

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

@stavros-k WDYT?

Copy link
Author

Choose a reason for hiding this comment

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

I'm all in to remove this, as it currently masks the fact that init does not work.
CI showed us that.

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.

[Bug]: Container will not run koel init, unless an .env file is bind mounted.

2 participants