Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/springtainer/springtainer-mysql
MySQL as docker-container for springboot testing
https://github.com/springtainer/springtainer-mysql
mysql spring spring-boot testcontainers testing
Last synced: about 17 hours ago
JSON representation
MySQL as docker-container for springboot testing
- Host: GitHub
- URL: https://github.com/springtainer/springtainer-mysql
- Owner: springtainer
- License: mit
- Created: 2018-03-16T12:28:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-26T22:16:53.000Z (over 1 year ago)
- Last Synced: 2023-07-26T21:18:50.624Z (over 1 year ago)
- Topics: mysql, spring, spring-boot, testcontainers, testing
- Language: Java
- Homepage:
- Size: 66.4 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# springtainer-mysql
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.avides.springboot.springtainer/springtainer-mysql/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.avides.springboot.springtainer/springtainer-mysql)
[![Build](https://github.com/springtainer/springtainer-mysql/workflows/release/badge.svg)](https://github.com/springtainer/springtainer-mysql/actions)
[![Nightly build](https://github.com/springtainer/springtainer-mysql/workflows/nightly/badge.svg)](https://github.com/springtainer/springtainer-mysql/actions)
[![Coverage report](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mysql&metric=coverage)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mysql)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mysql&metric=alert_status)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mysql)
[![Technical dept](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mysql&metric=sqale_index)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mysql)### Dependency
```xml
com.avides.springboot.springtainer
springtainer-mysql
1.4.0
test```
### Configuration
Properties consumed (in `bootstrap.properties`):
- `embedded.container.mysql.enabled` (default is `true`)
- `embedded.container.mysql.startup-timeout` (default is `30`)
- `embedded.container.mysql.docker-image` (default is `mysql:8.0.32`)
- `embedded.container.mysql.port` (default is `3306`)
- `embedded.container.mysql.root-password` (default is `root`)
- `embedded.container.mysql.database-name` (default is `embeddedMySqlDb`)
- `embedded.container.mysql.database-charset` (default is `utf8mb4`)Properties provided (in `application-it.properties`):
- `embedded.container.mysql.url` (an alias for `embedded.container.mysql.jdbc-url`)
- `embedded.container.mysql.jdbc-url`
- `embedded.container.mysql.r2dbc-url`
- `embedded.container.mysql.host`
- `embedded.container.mysql.port`Example for minimal configuration in `application-it.properties`:
```
spring.datasource.url=${embedded.container.mysql.url}
spring.datasource.username=root
spring.datasource.password=${embedded.container.mysql.root-password}
```## Logging
To reduce logging insert this into the logback-configuration:
```xml
```
## Labels
The container exports multiple labels to analyze running springtainers:
- `SPRINGTAINER_SERVICE=mysql`
- `SPRINGTAINER_IMAGE=${embedded.container.mysql.docker-image}`
- `SPRINGTAINER_STARTED=$currentTimestamp`