Skip to content

Commit

Permalink
feat(): corrected mongo_uri
Browse files Browse the repository at this point in the history
  • Loading branch information
Christiantyemele committed Jan 14, 2025
1 parent cd4e48d commit 84ca93c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ SERVER_PUBLIC_DOMAIN="https://didcomm-mediator.eudi-adorsys.com"
SERVER_LOCAL_PORT="8080"
STORAGE_DIRPATH="./storage"
MONGO_DBN="DIDComm_DB"
MONGO_URI="mongodb://mongodb:27017"

# MONGO_URI="mongodb://{MONGO_INITDB_ROOT_USERNAME}:{MONGO_INITDB_ROOT_PASSWORD}@mongodb:27017"
1 change: 1 addition & 0 deletions crates/database/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub fn get_or_init_database() -> Arc<RwLock<Database>> {
// Create a handle to a database.

Check warning on line 45 in crates/database/src/lib.rs

View workflow job for this annotation

GitHub Actions / Build and test

Diff in /home/runner/work/didcomm-mediator-rs/didcomm-mediator-rs/crates/database/src/lib.rs
let db = tokio::task::block_in_place(|| {
tokio::runtime::Handle::current().block_on(async move {

let client_options = ClientOptions::parse(mongo_uri)
.await
.expect("Failed to parse Mongo URI");
Expand Down
2 changes: 1 addition & 1 deletion mediator-charts/templates/mediator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
- name: MONGO_HOST
value: {{ .Release.Name }}-mongodb-service
- name: MONGO_URI
value: "mongodb:root:root:{{ .Release.Name }}-service:27017"
value: "mongodb://{{ .Release.Name }}-mongodb-service:27017"
- name: SERVER_PUBLIC_DOMAIN
valueFrom:
configMapKeyRef:
Expand Down
20 changes: 10 additions & 10 deletions mediator-charts/templates/mongodb-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ spec:
configMapKeyRef:
name: env
key: MONGO_DBN
- name: MONGO_INITDB_ROOT_USERNAME
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secret
key: username
- name: MONGO_INITDB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secret
key: password
# - name: MONGO_INITDB_ROOT_USERNAME
# valueFrom:
# secretKeyRef:
# name: {{ .Release.Name }}-secret
# key: username
# - name: MONGO_INITDB_ROOT_PASSWORD
# valueFrom:
# secretKeyRef:
# name: {{ .Release.Name }}-secret
# key: password
volumeMounts:
- name: {{ .Release.Name }}-mongo-persistent-storage
mountPath: {{ .Values.mongoVolume.mountPath }}
Expand Down

0 comments on commit 84ca93c

Please sign in to comment.