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

fix: MariaDB connection over SSL #1914

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ DOCKER_DB_PORT=3306
DOCKER_DB_USERNAME=gewis
DOCKER_DB_PASSWORD=gewis
DOCKER_DB_DATABASE=gewis
# The following is only used for development
DOCKER_DB_SSL=false

# These are the environment variabled for retrieving membership data (and others) from the gewisdb project
DOCKER_DB2_HOST=postgres
Expand Down
4 changes: 4 additions & 0 deletions config/autoload/doctrine.local.development.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ return [
'dbname' => getenv('DOCKER_DB_DATABASE'),
'charset' => 'utf8mb4',
'collate' => 'utf8mb4_unicode_ci',
'driverOptions' => filter_var(getenv('DOCKER_DB_SSL') ?? false, FILTER_VALIDATE_BOOLEAN) ? [
PDO::MYSQL_ATTR_SSL_CAPATH => '/etc/ssl/certs/',
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => true,
] : [],
],
],
],
Expand Down
4 changes: 4 additions & 0 deletions config/autoload/doctrine.local.production.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ return [
'dbname' => getenv('DOCKER_DB_DATABASE'),
'charset' => 'utf8mb4',
'collate' => 'utf8mb4_unicode_ci',
'driverOptions' => [
PDO::MYSQL_ATTR_SSL_CAPATH => '/etc/ssl/certs/',
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => true,
],
],
],
],
Expand Down
Loading