From f4aa3d385dc7623f8adb7419dede806787fd1198 Mon Sep 17 00:00:00 2001 From: barrfalk Date: Sun, 28 Apr 2024 11:51:30 -0700 Subject: [PATCH] environment variables rename --- .github/openshift/deploy.backend.yml | 42 +++++++++++++-------------- .github/openshift/deploy.database.yml | 18 ++++++------ backend/src/app.module.ts | 6 ++-- docker-compose.yml | 8 ++--- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/openshift/deploy.backend.yml b/.github/openshift/deploy.backend.yml index 2807baad..d2052c00 100644 --- a/.github/openshift/deploy.backend.yml +++ b/.github/openshift/deploy.backend.yml @@ -53,7 +53,7 @@ objects: app: ${NAME} stringData: cookie_secret: ${cookie_secret} - session_secret: ${session_secret} + session_secret: ${session_secret} - kind: PersistentVolumeClaim apiVersion: v1 metadata: @@ -65,7 +65,7 @@ objects: - ReadWriteMany resources: requests: - storage: "256Mi" + storage: '256Mi' storageClassName: netapp-file-standard - apiVersion: v1 kind: DeploymentConfig @@ -104,19 +104,19 @@ objects: imagePullPolicy: Always name: ${NAME} env: - - name: POSTGRESQL_HOST + - name: POSTGRES_HOST value: ${NAME}-${ZONE}-database - - name: POSTGRESQL_DATABASE + - name: POSTGRES_DATABASE valueFrom: secretKeyRef: name: ${NAME}-${ZONE}-database key: database-name - - name: POSTGRESQL_PASSWORD + - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: ${NAME}-${ZONE}-database key: database-password - - name: POSTGRESQL_USER + - name: POSTGRES_USER valueFrom: secretKeyRef: name: ${NAME}-${ZONE}-database @@ -128,77 +128,77 @@ objects: key: cookie_secret - name: session_secret valueFrom: - secretKeyRef: + secretKeyRef: name: ticdi-sessions key: session_secret - name: keycloak_base_url valueFrom: - secretKeyRef: + secretKeyRef: name: keycloak key: keycloak_base_url - name: keycloak_realm valueFrom: - secretKeyRef: + secretKeyRef: name: keycloak key: keycloak_realm - name: keycloak_client_id valueFrom: - secretKeyRef: + secretKeyRef: name: keycloak key: keycloak_client_id - name: keycloak_secret valueFrom: - secretKeyRef: + secretKeyRef: name: keycloak key: keycloak_secret - name: cdogs_service_client_id valueFrom: - secretKeyRef: + secretKeyRef: name: cdogs key: cdogs_service_client_id - name: cdogs_service_client_secret valueFrom: - secretKeyRef: + secretKeyRef: name: cdogs key: cdogs_service_client_secret - name: cdogs_url valueFrom: - secretKeyRef: + secretKeyRef: name: cdogs key: cdogs_url - name: cdogs_token_endpoint valueFrom: - secretKeyRef: + secretKeyRef: name: cdogs key: cdogs_token_endpoint - name: users_api_base_url valueFrom: - secretKeyRef: + secretKeyRef: name: css-users-api key: users_api_base_url - name: css_environment valueFrom: - secretKeyRef: + secretKeyRef: name: css-users-api key: css_environment - name: integration_id valueFrom: - secretKeyRef: + secretKeyRef: name: css-users-api key: integration_id - name: users_api_token_url valueFrom: - secretKeyRef: + secretKeyRef: name: css-users-api key: users_api_token_url - name: users_api_client_id valueFrom: - secretKeyRef: + secretKeyRef: name: css-users-api key: users_api_client_id - name: users_api_client_secret valueFrom: - secretKeyRef: + secretKeyRef: name: css-users-api key: users_api_client_secret - name: KEYCLOCK_CLIENT_ID diff --git a/.github/openshift/deploy.database.yml b/.github/openshift/deploy.database.yml index 7d8b11af..502fbd89 100644 --- a/.github/openshift/deploy.database.yml +++ b/.github/openshift/deploy.database.yml @@ -17,7 +17,7 @@ parameters: description: Image tag to use value: latest - description: Password for the PostgreSQL connection user. - from: "[a-zA-Z0-9]{16}" + from: '[a-zA-Z0-9]{16}' generate: expression name: DB_PASSWORD - description: Volume space available for data, e.g. 512Mi, 2Gi. @@ -52,7 +52,7 @@ objects: - ReadWriteOnce resources: requests: - storage: "${DB_PVC_SIZE}" + storage: '${DB_PVC_SIZE}' storageClassName: netapp-file-standard - kind: ImageStream apiVersion: v1 @@ -117,7 +117,7 @@ objects: command: - /usr/bin/env - bash - - "-c" + - '-c' - >- psql -q -d $POSTGRESQL_DATABASE -c 'SELECT 1' @@ -130,7 +130,7 @@ objects: command: - /usr/bin/env - bash - - "-c" + - '-c' - >- psql -q -d $POSTGRESQL_DATABASE -c 'SELECT 1' @@ -139,25 +139,25 @@ objects: periodSeconds: 15 timeoutSeconds: 1 env: - - name: POSTGRESQL_DATABASE + - name: POSTGRES_DATABASE valueFrom: secretKeyRef: name: ${NAME}-${ZONE}-${COMPONENT} key: database-name - - name: POSTGRESQL_PASSWORD + - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: ${NAME}-${ZONE}-${COMPONENT} key: database-password - - name: POSTGRESQL_USER + - name: POSTGRES_USER valueFrom: secretKeyRef: name: ${NAME}-${ZONE}-${COMPONENT} key: database-user volumeMounts: - name: ${NAME}-${ZONE}-${COMPONENT} - mountPath: "/var/lib/pgsql/data" - terminationMessagePath: "/dev/termination-log" + mountPath: '/var/lib/pgsql/data' + terminationMessagePath: '/dev/termination-log' terminationMessagePolicy: File imagePullPolicy: Always restartPolicy: Always diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index 89cedd78..f1d92d65 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -18,9 +18,9 @@ import { DocumentTypeModule } from './document_type/document_type.module'; import config from './ormconfig'; import { JWTAuthModule } from './auth/jwtauth.module'; -console.log('Var check - POSTGRESQL_HOST', process.env.POSTGRESQL_HOST); -console.log('Var check - POSTGRESQL_DATABASE', process.env.POSTGRESQL_DATABASE); -console.log('Var check - POSTGRESQL_USER', process.env.POSTGRESQL_USER); +console.log('Var check - POSTGRES_HOST', process.env.POSTGRES_HOST); +console.log('Var check - POSTGRES_DATABASE', process.env.POSTGRES_DATABASE); +console.log('Var check - POSTGRES_USER', process.env.POSTGRES_USER); if (process.env.POSTGRESQL_PASSWORD != null) { console.log('Var check - POSTGRESQL_PASSWORD present'); } else { diff --git a/docker-compose.yml b/docker-compose.yml index 1742462b..b9cd9458 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,10 +24,10 @@ services: - 'npm i && npm run start' environment: NODE_ENV: development - POSTGRESQL_HOST: database - POSTGRESQL_USER: default - POSTGRESQL_PASSWORD: default - POSTGRESQL_DATABASE: default + POSTGRES_HOST: database + POSTGRES_USER: default + POSTGRES_PASSWORD: default + POSTGRES_DATABASE: default session_secret: asdfasdh healthcheck: test: ['CMD', 'curl', '-f', 'http://localhost:3000/report']