Skip to content

Commit

Permalink
[CI]: working on the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Jan 28, 2024
1 parent 20ad045 commit 2a635be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ services:
- NODE_ENV=test
- DB_HOST=mongo
- DB_PORT=27017
- DB_USER=root
- DB_PASSWORD=pass
- DB_USER=user
- DB_PASSWORD=1234
- DB_NAME=RnDAO
- DISCORD_CLIENT_ID=1
- DISCORD_CLIENT_SECRET=1
Expand Down Expand Up @@ -41,6 +41,8 @@ services:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=pass
- MONGO_INITDB_DATABASE=RnDAO
volumes:
- ./docker-entrypoint-initdb.d/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
healthcheck:
test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
interval: 60s
Expand Down
4 changes: 4 additions & 0 deletions mongo-init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
print("Started Adding the Users.");
db = db.getSiblingDB("RnDAO");
db.createUser({ user: "user", pwd: "1234", roles: ["readWrite"] })
print("End Adding the User Roles.");

0 comments on commit 2a635be

Please sign in to comment.