Skip to content

Commit

Permalink
feat: Integrate MongoDB databse with the service
Browse files Browse the repository at this point in the history
  • Loading branch information
bouceka committed Nov 2, 2022
1 parent ac074c9 commit 2c74911
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ player-srv
#helper.md
# Local Databse
**/postgres-data/
**/mongodb_data_container/
18 changes: 11 additions & 7 deletions team-srv/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
version: '3.3'
version: '3.1'
services:
postgres:
image: "postgres:14.5"
mongodb_container:
image: mongo
environment:
POSTGRES_USER: team
POSTGRES_PASSWORD: password
POSTGRES_DB: team
MONGO_INITDB_ROOT_USERNAME: team
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- "5432:5432"
- 27017:27017
volumes:
- './mongodb_data_container:/data/db'

volumes:
mongodb_data_container:
8 changes: 2 additions & 6 deletions team-srv/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ micronaut.application.name=teamSrv
#datasources.default.url=jdbc\:h2\:mem\:devDb;MVCC\=TRUE;LOCK_TIMEOUT\=10000;DB_CLOSE_ON_EXIT\=FALSE
#datasources.default.driverClassName=org.h2.Driver

datasources.default.url= jdbc:postgresql://localhost:5432/team
datasources.default.username= team
datasources.default.password= password

endpoints.health.details-visible=anonymous
flyway.datasources.default.enabled= true
flyway.datasources.default.locations=classpath:db/migration
mongodb.uri= mongodb://team:password@localhost:27017



endpoints.flyway.enabled= true
Expand Down

0 comments on commit 2c74911

Please sign in to comment.