Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/springtainer/springtainer-mongodb
MongoDB as docker-container for springboot testing
https://github.com/springtainer/springtainer-mongodb
mongodb spring spring-boot testcontainers testing
Last synced: about 1 month ago
JSON representation
MongoDB as docker-container for springboot testing
- Host: GitHub
- URL: https://github.com/springtainer/springtainer-mongodb
- Owner: springtainer
- License: mit
- Created: 2018-03-16T12:28:18.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-26T22:16:00.000Z (over 1 year ago)
- Last Synced: 2023-06-29T21:44:35.526Z (over 1 year ago)
- Topics: mongodb, spring, spring-boot, testcontainers, testing
- Language: Java
- Homepage:
- Size: 51.8 KB
- Stars: 5
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# springtainer-mongodb
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.avides.springboot.springtainer/springtainer-mongodb/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.avides.springboot.springtainer/springtainer-mongodb)
[![Build](https://github.com/springtainer/springtainer-mongodb/workflows/release/badge.svg)](https://github.com/springtainer/springtainer-mongodb/actions)
[![Nightly build](https://github.com/springtainer/springtainer-mongodb/workflows/nightly/badge.svg)](https://github.com/springtainer/springtainer-mongodb/actions)
[![Coverage report](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mongodb&metric=coverage)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mongodb)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mongodb&metric=alert_status)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mongodb)
[![Technical dept](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mongodb&metric=sqale_index)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mongodb)### Dependency
```xml
com.avides.springboot.springtainer
springtainer-mongodb
1.4.0
test```
### Configuration
Properties consumed (in `bootstrap.properties`):
- `embedded.container.mongodb.enabled` (default is `true`)
- `embedded.container.mongodb.startup-timeout` (default is `30`)
- `embedded.container.mongodb.docker-image` (default is `mongo:4.2.24`)
- `embedded.container.mongodb.port` (default is `27017`)Properties provided (in `application-it.properties`):
- `embedded.container.mongodb.host`
- `embedded.container.mongodb.port`Example for minimal configuration in `application-it.properties`:
```
spring.data.mongodb.uri=mongodb://${embedded.container.mongodb.host}:${embedded.container.mongodb.port}/test
```## Logging
To reduce logging insert this into the logback-configuration:
```xml
```
## Labels
The container exports multiple labels to analyze running springtainers:
- `SPRINGTAINER_SERVICE=mongodb`
- `SPRINGTAINER_IMAGE=${embedded.container.mongodb.docker-image}`
- `SPRINGTAINER_STARTED=$currentTimestamp`