This commit is contained in:
Benjamin Toby
2024-11-06 13:06:51 +01:00
parent 06ff13c653
commit eb341a7845
276 changed files with 4197 additions and 510 deletions
@@ -4,7 +4,8 @@ const fs = require("fs");
const path = require("path");
const mysql = require("serverless-mysql");
const SSL_DIR = "/app/ssl";
const SSL_DIR =
process.env.DSQL_SSL_DIR || path.resolve(__dirname, "../../../../ssl");
const MASTER = mysql({
config: {
@@ -12,7 +13,9 @@ const MASTER = mysql({
user: process.env.DSQL_DB_USERNAME,
password: process.env.DSQL_DB_PASSWORD,
database: process.env.DSQL_DB_NAME,
port: process.env.DB_PORT ? Number(process.env.DB_PORT) : undefined,
port: process.env.DSQL_DB_PORT
? Number(process.env.DSQL_DB_PORT)
: undefined,
charset: "utf8mb4",
ssl: {
ca: fs.readFileSync(`${SSL_DIR}/ca-cert.pem`),
@@ -5,7 +5,8 @@ const path = require("path");
const mysql = require("serverless-mysql");
const SSL_DIR = "/app/ssl";
const SSL_DIR =
process.env.DSQL_SSL_DIR || path.resolve(__dirname, "../../../../ssl");
let DSQL_USER = mysql({
config: {
@@ -3,18 +3,10 @@
const fs = require("fs");
const path = require("path");
// const mysql = require("mysql");
// const NO_DB = mysql.createConnection({
// host: process.env.DSQL_DB_HOST,
// user: process.env.DSQL_DB_USERNAME,
// password: process.env.DSQL_DB_PASSWORD,
// charset: "utf8mb4",
// });
const mysql = require("serverless-mysql");
const SSL_DIR = "/app/ssl";
const SSL_DIR =
process.env.DSQL_SSL_DIR || path.resolve(__dirname, "../../../../ssl");
let NO_DB = mysql({
config: {
@@ -5,7 +5,8 @@ const path = require("path");
const mysql = require("serverless-mysql");
const SSL_DIR = "/app/ssl";
const SSL_DIR =
process.env.DSQL_SSL_DIR || path.resolve(__dirname, "../../../../ssl");
let NO_DB = mysql({
config: {