https://github.com/nikos/spring-boot-flyway-docker-sample
Minimal Spring Boot Sample application with integration tests leveraging flyway DB migrations on a PostgreSQL running inside a Docker container.
https://github.com/nikos/spring-boot-flyway-docker-sample
docker flyway flyway-postgresql java java-8 jdbc maven postgresql spring-boot
Last synced: 3 months ago
JSON representation
Minimal Spring Boot Sample application with integration tests leveraging flyway DB migrations on a PostgreSQL running inside a Docker container.
- Host: GitHub
- URL: https://github.com/nikos/spring-boot-flyway-docker-sample
- Owner: nikos
- License: apache-2.0
- Created: 2017-05-18T05:47:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-18T06:05:14.000Z (about 8 years ago)
- Last Synced: 2025-01-13T06:22:06.750Z (4 months ago)
- Topics: docker, flyway, flyway-postgresql, java, java-8, jdbc, maven, postgresql, spring-boot
- Language: Java
- Size: 10.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spring-boot-flyway-docker-sample
Minimal Spring Boot Sample application with integration tests leveraging flyway DB migrations on a PostgreSQL running inside a Docker container.
Requirements:
* Java 8
* Maven
* DockerExecute integration tests with, which will start a PostgreSQL database inside a docker container,
making it available on a random high network port:mvn clean verify
## Resources
* [Integration Testing with Docker and Maven](http://info.michael-simons.eu/2016/08/25/integration-testing-with-docker-and-maven/)
* [Execute Flyway database migrations on startup](https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-execute-flyway-database-migrations-on-startup)
* [Alternative: Using testcontainers and JUnit's ClassRule concept](https://github.com/testcontainers/testcontainers-java-examples/blob/master/spring-boot/src/test/java/com/example/AbstractIntegrationTest.java)