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.
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.