Skip to content

DATABASE_URL not honoured when using Docker #1206

@megaocta

Description

@megaocta

Describe the bug

I copied the example docker compose file from here and expect the location of the database at /var/www/html/var/db/app.db. I ran the migrate command bin/console doctrine:migrations:migrate but the database file stayed at 0b size. PHP uses a database file located at /var/www/html/var/app.db.

echo $DATABASE_URL inside the container shows the correct URL configured in the compose file but PHP seems to be using the $DATABASE_URL variable defined in .env, which points to the wrong database file.

After changing the path defined in .env and re-running the migrate command, Part-DB started successfully.

Server Side

  • Part-DB Version: 2.5.0
  • PHP Version: 8.4.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions