- update: auto generate the database url using the saved secret

This commit is contained in:
2025-03-18 00:11:08 -04:00
parent eebf5c58e0
commit e28219c8b7
2 changed files with 6 additions and 1 deletions

View File

@@ -20,9 +20,14 @@ spec:
image: "{{ $.Values.repository }}/{{ .image }}" image: "{{ $.Values.repository }}/{{ .image }}"
ports: ports:
- containerPort: {{ .port }} - containerPort: {{ .port }}
env:
- name: DATABASE_URL
value: "postgres://$(POSTGRES_USER):$(POSTGRES_PASSWORD)@postgres:5432/$(POSTGRES_DB)"
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ .name }}-env name: {{ .name }}-env
- secretRef:
name: postgres-secrets
volumeMounts: volumeMounts:
- name: service-ids - name: service-ids
mountPath: /services mountPath: /services

View File

@@ -8,7 +8,7 @@ global:
env: env:
LOG_LEVEL: "info" LOG_LEVEL: "info"
APP_ENV: "dev" APP_ENV: "dev"
DATABASE_URL: "postgres://postgres:5432/osirose" DATABASE_URL: "" # This is a placeholder. Will be dynamically constructed
services: services:
- name: api-service - name: api-service