From b6d9842bcd04ea6b6d28daa2e8e0a38f8ed64ec9 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Wed, 8 Oct 2025 11:32:06 +0200 Subject: [PATCH] feat: add SKEBBY_USER and SKEBBY_PASS environment variables for Skebby integration --- apps/infoalloggi/.github/workflows/ci.yml | 2 ++ apps/infoalloggi/Dockerfile | 10 ++++++++++ apps/infoalloggi/dev-docker-compose.yml | 4 ++++ apps/infoalloggi/src/env.mjs | 4 ++++ .../src/server/controllers/skebby.controller.ts | 3 ++- docker-compose.yml | 4 ++++ 6 files changed, 26 insertions(+), 1 deletion(-) diff --git a/apps/infoalloggi/.github/workflows/ci.yml b/apps/infoalloggi/.github/workflows/ci.yml index ab9cefd..57a5120 100644 --- a/apps/infoalloggi/.github/workflows/ci.yml +++ b/apps/infoalloggi/.github/workflows/ci.yml @@ -26,6 +26,8 @@ env: KEYDB_URL: "keydb://string" JWT_SECRET: "335922ae" SKIP_REDIS: "false" + SKEBBY_USER: "test" + SKEBBY_PASS : "test" jobs: build: runs-on: ubuntu-latest diff --git a/apps/infoalloggi/Dockerfile b/apps/infoalloggi/Dockerfile index 165379d..ab8fbfc 100644 --- a/apps/infoalloggi/Dockerfile +++ b/apps/infoalloggi/Dockerfile @@ -68,6 +68,11 @@ ENV TILES_URL=$TILES_URL ENV NEXT_TELEMETRY_DISABLED=1 ENV SKIP_REDIS="true" +ARG SKEBBY_USER +ENV SKEBBY_USER=$SKEBBY_USER +ARG SKEBBY_PASS +ENV SKEBBY_PASS=$SKEBBY_PASS + RUN SKIP_ENV_VALIDATION=1 npm run build @@ -125,6 +130,11 @@ ENV TILES_URL=$TILES_URL ENV NEXT_TELEMETRY_DISABLED=1 ENV SKIP_REDIS="false" +ARG SKEBBY_USER +ENV SKEBBY_USER=$SKEBBY_USER +ARG SKEBBY_PASS +ENV SKEBBY_PASS=$SKEBBY_PASS + RUN addgroup -g 1001 -S nodejs RUN adduser -S nextjs -u 1001 diff --git a/apps/infoalloggi/dev-docker-compose.yml b/apps/infoalloggi/dev-docker-compose.yml index 40f9bd9..7bec614 100644 --- a/apps/infoalloggi/dev-docker-compose.yml +++ b/apps/infoalloggi/dev-docker-compose.yml @@ -26,6 +26,8 @@ services: EXP_API_USER: ${EXP_API_USER} EXP_API_PASS: ${EXP_API_PASS} JWT_SECRET: ${JWT_SECRET} + SKEBBY_USER: ${SKEBBY_USER} + SKEBBY_PASS: ${SKEBBY_PASS} working_dir: /app environment: INTERNAL_BASE_URL: ${INTERNAL_BASE_URL} @@ -50,6 +52,8 @@ services: EXP_API_USER: ${EXP_API_USER} EXP_API_PASS: ${EXP_API_PASS} JWT_SECRET: ${JWT_SECRET} + SKEBBY_USER: ${SKEBBY_USER} + SKEBBY_PASS: ${SKEBBY_PASS} ports: - "3000:3000" networks: diff --git a/apps/infoalloggi/src/env.mjs b/apps/infoalloggi/src/env.mjs index 25f7849..d2e8a4f 100644 --- a/apps/infoalloggi/src/env.mjs +++ b/apps/infoalloggi/src/env.mjs @@ -28,6 +28,8 @@ const server = z.object({ STRIPE_SECRET_KEY: z.string(), STRIPE_WEBHOOK_SECRET: z.string(), TILES_URL: z.string(), + SKEBBY_USER: z.string(), + SKEBBY_PASS: z.string(), }); /** @@ -69,6 +71,8 @@ const processEnv = { STRIPE_SECRET_KEY: process.env.STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET, TILES_URL: process.env.TILES_URL, + SKEBBY_USER: process.env.SKEBBY_USER, + SKEBBY_PASS: process.env.SKEBBY_PASS, }; // Don't touch the part below diff --git a/apps/infoalloggi/src/server/controllers/skebby.controller.ts b/apps/infoalloggi/src/server/controllers/skebby.controller.ts index b7474f9..56f9ade 100644 --- a/apps/infoalloggi/src/server/controllers/skebby.controller.ts +++ b/apps/infoalloggi/src/server/controllers/skebby.controller.ts @@ -1,3 +1,4 @@ +import { env } from "~/env.mjs"; import { GetFlagValueHandler } from "~/server/controllers/flags.controller"; import { db } from "~/server/db"; import { NewMail } from "~/server/services/mailer"; @@ -144,7 +145,7 @@ export const SendMessage = async (data: MinimalSMSData) => { }; } try { - const auth = await login("arcasms2018", "123qwe456rtyA."); + const auth = await login(env.SKEBBY_USER, env.SKEBBY_PASS); await sendSMS(auth, { ...data, message_type: MessageType.HIGH_QUALITY, diff --git a/docker-compose.yml b/docker-compose.yml index d603bc7..de175fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -148,6 +148,8 @@ services: EXP_API_USER: ${EXP_API_USER} EXP_API_PASS: ${EXP_API_PASS} JWT_SECRET: ${JWT_SECRET} + SKEBBY_USER: ${SKEBBY_USER} + SKEBBY_PASS: ${SKEBBY_PASS} working_dir: /app environment: INTERNAL_BASE_URL: http://web:3000 @@ -172,6 +174,8 @@ services: EXP_API_USER: ${EXP_API_USER} EXP_API_PASS: ${EXP_API_PASS} JWT_SECRET: ${JWT_SECRET} + SKEBBY_USER: ${SKEBBY_USER} + SKEBBY_PASS: ${SKEBBY_PASS} networks: - dokploy-network ports: