Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit b339207

Browse files
committed
fix: use host and port instead of mongodb uri
1 parent b4b0bc3 commit b339207

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/ci-cd.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111
name: Test Project
1212
runs-on: ubuntu-latest
1313
env:
14-
MONGO_URI: ${{ secrets.MONGO_URI }}
14+
MONGO_HOST: ${{ secrets.MONGO_HOST }}
15+
MONGO_PORT: ${{ secrets.MONGO_PORT }}
1516
MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }}
1617
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
1718

@@ -106,7 +107,8 @@ jobs:
106107
docker compose down --rmi all
107108
docker compose stop
108109
docker compose rm -f
109-
export MONGO_URI=${{ secrets.MONGO_URI }}
110+
export MONGO_HOST=${{ secrets.MONGO_HOST }}
111+
export MONGO_PORT=${{ secrets.MONGO_PORT }}
110112
export MONGO_USERNAME=${{ secrets.MONGO_USERNAME }}
111113
export MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }}
112114
docker compose pull

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
name: Test Project
1616
runs-on: ubuntu-latest
1717
env:
18-
MONGO_URI: ${{ secrets.MONGO_URI }}
18+
MONGO_HOST: ${{ secrets.MONGO_HOST }}
19+
MONGO_PORT: ${{ secrets.MONGO_PORT }}
1920
MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }}
2021
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
2122

src/main/resources/application.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ spring:
33
name: API
44
data:
55
mongodb:
6-
uri: ${MONGO_URI}
6+
host: ${MONGO_HOST}
7+
port: ${MONGO_PORT}
78
username: ${MONGO_USERNAME}
89
password: ${MONGO_PASSWORD}
9-
database: website
10+
database: website
11+
authentication-database: website

0 commit comments

Comments
 (0)