From 6da30e9fd2c6be42db23b38314445fff1c33d75a Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 22 Oct 2025 12:45:08 +0200 Subject: [PATCH] again fix --- .github/workflows/test_dlt_connector.yml | 11 +++++++++++ dlt-connector/src/config/schema.ts | 21 ++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_dlt_connector.yml b/.github/workflows/test_dlt_connector.yml index 4e1b660e8..bfde9cc8b 100644 --- a/.github/workflows/test_dlt_connector.yml +++ b/.github/workflows/test_dlt_connector.yml @@ -28,6 +28,17 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + + - name: create .env + run: | + cd dlt-connector + cat < .env + GRADIDO_BLOCKCHAIN_CRYPTO_APP_SECRET=$(openssl rand -hex 16) + GRADIDO_BLOCKCHAIN_SERVER_CRYPTO_KEY=$(openssl rand -hex 16) + HOME_COMMUNITY_SEED=$(openssl rand -hex 32) + HIERO_OPERATOR_KEY=$(openssl rand -hex 32) + HIERO_OPERATOR_ID="0.0.2" + EOF - name: Build 'test' image run: docker build --target production -t "gradido/dlt-connector:productionTest" -f dlt-connector/Dockerfile . diff --git a/dlt-connector/src/config/schema.ts b/dlt-connector/src/config/schema.ts index 6c364a3ef..08eeb2b80 100644 --- a/dlt-connector/src/config/schema.ts +++ b/dlt-connector/src/config/schema.ts @@ -20,15 +20,18 @@ export const configSchema = v.object({ ), '6010', ), - JWT_SECRET: v.optional(v.pipe( - v.string('The JWT secret for connecting to the backend'), - v.custom((input: unknown): boolean => { - if (process.env.NODE_ENV === 'production' && input === 'secret123') { - return false - } - return true - }, "Shouldn't use default value in production"), - ), 'secret123'), + JWT_SECRET: v.optional( + v.pipe( + v.string('The JWT secret for connecting to the backend'), + v.custom((input: unknown): boolean => { + if (process.env.NODE_ENV === 'production' && input === 'secret123') { + return false + } + return true + }, "Shouldn't use default value in production"), + ), + 'secret123', + ), GRADIDO_BLOCKCHAIN_CRYPTO_APP_SECRET: hexSchema, GRADIDO_BLOCKCHAIN_SERVER_CRYPTO_KEY: hex16Schema, HOME_COMMUNITY_SEED: v.pipe(