Skip to content

Conversation

@valerio-bozzolan
Copy link

@valerio-bozzolan valerio-bozzolan commented Sep 23, 2025

The new environment variable MARIADB_SERVICE can be used if you have a custom Docker Compose service name for your database.

For example, if your Docker Compose has a service called db, just do this in your .env file:

MARIADB_SERVICE=db

This change is backward-compatible. The default is still mariadb.

Closes #816 (comment)

The new environment variable 'MARIADB_SERVICE' can be used
if you have a custom Docker Compose service name for your database.

For example, if your Docker Compose has a service called 'db', just do this
in your .env file:

    MARIADB_SERVICE=db

Closes laravel#816 (comment)
@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!

@valerio-bozzolan
Copy link
Author

As a package, it sounds impossible.

This is a Bash script, and it had hardcoded service names.

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.

"sail mariadb": does not use environment vars («mariadb: option '-u' requires an argument»)

2 participants