diff --git a/.github/workflows/test_mariadb.yml b/.github/workflows/test_mariadb.yml deleted file mode 100644 index fe101bc48..000000000 --- a/.github/workflows/test_mariadb.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Gradido MariaDB Test CI - -on: push - -jobs: - files-changed: - name: Detect File Changes - MariaDB - runs-on: ubuntu-latest - outputs: - mariadb: ${{ steps.changes.outputs.mariadb }} - steps: - - uses: actions/checkout@v3.3.0 - - - name: Check for frontend file changes - uses: dorny/paths-filter@v2.11.1 - id: changes - with: - token: ${{ github.token }} - filters: .github/file-filters.yml - list-files: shell - - build_test: - if: needs.files-changed.outputs.mariadb == 'true' - name: Docker Build Test - MariaDB - needs: files-changed - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: MariaDB | Build 'test' image - run: docker build --target mariadb_server -t "gradido/mariadb:test" -f ./mariadb/Dockerfile ./ diff --git a/backend/src/apis/ConnectionAgents.ts b/backend/src/apis/ConnectionAgents.ts new file mode 100644 index 000000000..8ce585242 --- /dev/null +++ b/backend/src/apis/ConnectionAgents.ts @@ -0,0 +1,5 @@ +import { Agent } from 'http' +import { Agent as HttpsAgent } from 'https' + +export const httpAgent = new Agent({ keepAlive: true }) +export const httpsAgent = new HttpsAgent({ keepAlive: true }) diff --git a/backend/src/apis/HttpRequest.ts b/backend/src/apis/HttpRequest.ts index 27578463a..2c7b8b5a1 100644 --- a/backend/src/apis/HttpRequest.ts +++ b/backend/src/apis/HttpRequest.ts @@ -7,10 +7,12 @@ import axios from 'axios' import { LogError } from '@/server/LogError' import { backendLogger as logger } from '@/server/logger' +import { httpAgent, httpsAgent } from './ConnectionAgents' + export const apiPost = async (url: string, payload: unknown): Promise => { logger.trace('POST', url, payload) try { - const result = await axios.post(url, payload) + const result = await axios.post(url, payload, { httpAgent, httpsAgent }) logger.trace('POST-Response', result) if (result.status !== 200) { throw new LogError('HTTP Status Error', result.status) @@ -27,7 +29,7 @@ export const apiPost = async (url: string, payload: unknown): Promise => { export const apiGet = async (url: string): Promise => { logger.trace('GET: url=' + url) try { - const result = await axios.get(url) + const result = await axios.get(url, { httpAgent, httpsAgent }) logger.trace('GET-Response', result) if (result.status !== 200) { throw new LogError('HTTP Status Error', result.status) diff --git a/backend/src/apis/gms/GmsClient.ts b/backend/src/apis/gms/GmsClient.ts index a59f7f6b5..9af018e1c 100644 --- a/backend/src/apis/gms/GmsClient.ts +++ b/backend/src/apis/gms/GmsClient.ts @@ -4,6 +4,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-argument */ import axios from 'axios' +import { httpAgent, httpsAgent } from '@/apis/ConnectionAgents' import { CONFIG } from '@/config' import { LogError } from '@/server/LogError' import { backendLogger as logger } from '@/server/logger' @@ -126,9 +127,10 @@ export async function createGmsUser(apiKey: string, user: GmsUser): Promise diff --git a/frontend/src/layouts/AuthLayout.vue b/frontend/src/layouts/AuthLayout.vue index ab6973a0e..bc77b102f 100644 --- a/frontend/src/layouts/AuthLayout.vue +++ b/frontend/src/layouts/AuthLayout.vue @@ -30,7 +30,7 @@
{{ $t('1000thanks') }}
- + @@ -62,7 +62,7 @@ diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile deleted file mode 100644 index 25075c79d..000000000 --- a/mariadb/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -######################################################################################################### -# mariadb server -######################################################################################################### -FROM mariadb:10.5 as mariadb_server