feat: add Docker deployment with HAProxy and blue-green strategy

This commit is contained in:
badblocks 2025-07-21 23:25:19 -07:00
parent 3cfa59d3a5
commit 5be1e5add5
No known key found for this signature in database
26 changed files with 56198 additions and 582 deletions

View file

@ -43,11 +43,16 @@ export default defineEventHandler(async (event) => {
}
try {
const api = createSmsGatewayClient(config);
const otp = generateTOTP(normalizedPhoneNumber, config.superSecretSalt);
const step_min = Math.floor(getTOTPstep() / 60);
const step_sec = getTOTPstep() % 60;
if (config.androidSmsGatewayBypass === "true") {
recordOtpRequest(normalizedPhoneNumber);
return { success: true, messageId: "bypassed" };
}
const api = createSmsGatewayClient(config);
const message = {
phoneNumbers: [normalizedPhoneNumber],
message: `${otp} is your verification code. This code is valid for ${step_min}m${step_sec}s.`,