Skip to content

Commit 39915d7

Browse files
committed
Integrate server to mongodb
1 parent 8ce1842 commit 39915d7

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
restart: unless-stopped
4646

4747
mongodb:
48-
image: mongo:latest
48+
image: mongo:8.0
4949
container_name: mongodb
5050
ports:
5151
- "27017:27017"

recipai-chart/templates/mongodb-deployment.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
spec:
1414
containers:
1515
- name: mongodb
16-
image: mongo:6.0
16+
image: mongo:8.0
1717
imagePullPolicy: IfNotPresent
1818
ports:
1919
- containerPort: 27017
@@ -28,9 +28,11 @@ spec:
2828
memory: "512Mi"
2929
cpu: "500m"
3030
env:
31-
- name: MONGO_INITDB_ROOT_USERNAME
31+
- name: MONGO_HOST
32+
- value: {{ .Values.services.mongodb }}:27017
33+
- name: MONGO_USERNAME
3234
value: {{ .Values.db.adminUsername }}
33-
- name: MONGO_INITDB_ROOT_PASSWORD
35+
- name: MONGO_PASSWORD
3436
valueFrom:
3537
secretKeyRef:
3638
name: mongodb-secret

server/src/main/resources/application.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ spring:
1616
uri: http://genai-service:8000
1717
predicates:
1818
- Path=/genai/**
19-
2019
data:
2120
mongodb:
22-
uri: ${MONGODB_URI:mongodb://admin:admin@127.0.0.1:27017/recipai?authSource=admin}
21+
uri: mongodb://${MONGO_USERNAME:admin}:${MONGO_PASSWORD:admin}@${MONGO_HOST:127.0.0.1:27017}/recipai?authSource=admin

0 commit comments

Comments
 (0)