Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Support of unix socket for access to mysql/mariadb database #41

Description

@casswarry0

To support unix sockets for database access I had to change the file:
/opt/mailman/build/main.js

where it was:
const db = __WEBPACK_IMPORTED_MODULE_0_knex___default()({
client: process.env.MAILMAN_DB_ENGINE || "maria",
connection: {
host: process.env.MAILMAN_DB_HOST || "127.0.0.1",
user: process.env.MAILMAN_DB_USER,
password: process.env.MAILMAN_DB_PASSWORD,
db: process.env.MAILMAN_DB_DATABASE
}
});

I made:
const db = __WEBPACK_IMPORTED_MODULE_0_knex___default()({
client: process.env.MAILMAN_DB_ENGINE || "maria",
connection: {
unixSocket: process.env.MAILMAN_DB_SOCKET,
host: process.env.MAILMAN_DB_HOST,
user: process.env.MAILMAN_DB_USER,
password: process.env.MAILMAN_DB_PASSWORD,
db: process.env.MAILMAN_DB_DATABASE
}
});

I added the unixSocket and removed the default from host. It would be nice to add port too, for issue #38. After the change, there has to be either MAILMAN_DB_SOCKET or MAILMAN_DB_HOST in the .env file but not both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions