Skip to content

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

Description

@stavros-k

This is a Docker-related issue.

  • I am filing a bug report related to the Docker image of Koel

Reproduction steps

Even if I pass the envs via docker compose environment section. koel-init will exit here

exit 0
because it tests for a file to exist.

Expected behavior

koel init to run even without the .env file present.

Actual behavior

koel init is skipped.

Logs

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  | running docker-php-entrypoint with arguments apache2-foreground
koel-1  | [Tue Jan 27 17:36:29.689393 2026] [so:warn] [pid 1:tid 1] AH01574: module xsendfile_module is already loaded, skipping
koel-1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
koel-1  | [Tue Jan 27 17:36:29.702271 2026] [so:warn] [pid 1:tid 1] AH01574: module xsendfile_module is already loaded, skipping
koel-1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
koel-1  | [Tue Jan 27 17:36:29.720520 2026] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.62 (Debian) PHP/8.4.8 configured -- resuming normal operations
koel-1  | [Tue Jan 27 17:36:29.720538 2026] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
koel-1  | 127.0.0.1 - - [27/Jan/2026:17:36:31 +0000] "GET /sw.js HTTP/1.1" 200 777 "-" "curl/7.88.1"

Koel version

8.3.0

Additional information

  • Database: Postgres
  • Browser & device: N/A
  • Additional context: N/A

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions