Skip to content

Commit

Permalink
environment variables rename
Browse files Browse the repository at this point in the history
  • Loading branch information
barrfalk committed Apr 28, 2024
1 parent 4696d2e commit f4aa3d3
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 37 deletions.
42 changes: 21 additions & 21 deletions .github/openshift/deploy.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -65,7 +65,7 @@ objects:
- ReadWriteMany
resources:
requests:
storage: "256Mi"
storage: '256Mi'
storageClassName: netapp-file-standard
- apiVersion: v1
kind: DeploymentConfig
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 9 additions & 9 deletions .github/openshift/deploy.database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -52,7 +52,7 @@ objects:
- ReadWriteOnce
resources:
requests:
storage: "${DB_PVC_SIZE}"
storage: '${DB_PVC_SIZE}'
storageClassName: netapp-file-standard
- kind: ImageStream
apiVersion: v1
Expand Down Expand Up @@ -117,7 +117,7 @@ objects:
command:
- /usr/bin/env
- bash
- "-c"
- '-c'
- >-
psql -q -d
$POSTGRESQL_DATABASE -c 'SELECT 1'
Expand All @@ -130,7 +130,7 @@ objects:
command:
- /usr/bin/env
- bash
- "-c"
- '-c'
- >-
psql -q -d
$POSTGRESQL_DATABASE -c 'SELECT 1'
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit f4aa3d3

Please sign in to comment.