Skip to content

Commit

Permalink
Improvements to variable handling
Browse files Browse the repository at this point in the history
Signed-off-by: Emiliano Suñé <[email protected]>
  • Loading branch information
esune committed Oct 9, 2024
1 parent d0430aa commit 97f6b43
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions charts/tdw-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: trustdidweb-server-py
icon: https://identity.foundation/trustdidweb/tdw.jpg
description: An api server to register and serve trusted web dids.
type: application
version: 0.0.8
appVersion: "0.0.5"
version: 0.0.9
appVersion: "0.0.6"

maintainers:
- name: PatStLouis
Expand Down
4 changes: 2 additions & 2 deletions charts/tdw-server/templates/server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ spec:
key: password
- name: POSTGRES_SERVER_NAME
value: {{ include "global.postgresql.fullname" . }}
- name: POSTGRES_SERVER_PASSWORD
value: {{ .Values.postgresql.primary.service.ports.postgresql }}
- name: POSTGRES_SERVER_PORT
value: {{ .Values.postgresql.primary.service.ports.postgresql | quote }}
ports:
- name: api
containerPort: {{ .Values.server.service.apiPort }}
Expand Down
10 changes: 5 additions & 5 deletions server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class Settings(BaseSettings):
DID_WEB_BASE: str = f"did:web:{DOMAIN}"
ENDORSER_MULTIKEY: str = os.environ["ENDORSER_MULTIKEY"]

POSTGRES_USER: str = os.environ["POSTGRES_USER"]
POSTGRES_PASSWORD: str = os.environ["POSTGRES_PASSWORD"]
POSTGRES_SERVER_NAME: str = os.environ["POSTGRES_SERVER_NAME"]
POSTGRES_SERVER_PORT: str = os.environ["POSTGRES_SERVER_PORT"]
POSTGRES_USER: str = os.getenv("POSTGRES_USER", "")
POSTGRES_PASSWORD: str = os.getenv("POSTGRES_PASSWORD", "")
POSTGRES_SERVER_NAME: str = os.getenv("POSTGRES_SERVER_NAME", "")
POSTGRES_SERVER_PORT: str = os.getenv("POSTGRES_SERVER_PORT", "")

ASKAR_DB: str = "sqlite://app.db"
if (
Expand All @@ -33,7 +33,7 @@ class Settings(BaseSettings):
f"Using postgres storage: {POSTGRES_SERVER_NAME}:{POSTGRES_SERVER_PORT}"
)
ASKAR_DB: str = (
f"postgres://{POSTGRES_USER}:{POSTGRES_PASSWORD}@{POSTGRES_SERVER_NAME}:{POSTGRES_SERVER_PORT}"
f"postgres://{POSTGRES_USER}:{POSTGRES_PASSWORD}@{POSTGRES_SERVER_NAME}:{POSTGRES_SERVER_PORT}/tdw-server"
)
else:
logging.info("Using SQLite database")
Expand Down

0 comments on commit 97f6b43

Please sign in to comment.