Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Null password support for Mariadb #343

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion app/Services/MariaDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,24 @@
[
'shortname' => 'root_password',
'prompt' => 'What will the root password be?',
'default' => 'password',
'default' => '',
],
];

protected $dockerRunTemplate = '-p "${:port}":3306 \
-e MYSQL_ROOT_PASSWORD="${:root_password}" \
-e MYSQL_ALLOW_EMPTY_PASSWORD="${:allow_empty_password}" \
-v "${:volume}":/var/lib/mysql \
"${:organization}"/"${:image_name}":"${:tag}"';

protected static $displayName = 'MariaDB';

protected function buildParameters(): array
{
$parameters = parent::buildParameters();

$parameters["allow_empty_password"] = $parameters["root_password"] === "" ? "yes" : "no";

Check failure on line 36 in app/Services/MariaDb.php

View workflow job for this annotation

GitHub Actions / PHPCS

String "allow_empty_password" does not require double quotes; use single quotes instead

Check failure on line 36 in app/Services/MariaDb.php

View workflow job for this annotation

GitHub Actions / PHPCS

String "root_password" does not require double quotes; use single quotes instead

Check failure on line 36 in app/Services/MariaDb.php

View workflow job for this annotation

GitHub Actions / PHPCS

String "" does not require double quotes; use single quotes instead

Check failure on line 36 in app/Services/MariaDb.php

View workflow job for this annotation

GitHub Actions / PHPCS

String "yes" does not require double quotes; use single quotes instead

Check failure on line 36 in app/Services/MariaDb.php

View workflow job for this annotation

GitHub Actions / PHPCS

String "no" does not require double quotes; use single quotes instead

return $parameters;
}
}
Loading