Created
January 6, 2020 10:22
-
-
Save FroMage/acc9673b8cc4ae97f027ec2f57fc0ed5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<profile> | |
<id>docker-postgresql</id> | |
<activation> | |
<property> | |
<name>docker</name> | |
</property> | |
</activation> | |
<properties> | |
<postgres.url>jdbc:postgresql://localhost:5431/hibernate_orm_test</postgres.url> | |
</properties> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>io.fabric8</groupId> | |
<artifactId>docker-maven-plugin</artifactId> | |
<configuration> | |
<images> | |
<image> | |
<name>postgres:10.5</name> | |
<alias>postgresql</alias> | |
<run> | |
<env> | |
<POSTGRES_USER>hibernate_orm_test</POSTGRES_USER> | |
<POSTGRES_PASSWORD>hibernate_orm_test</POSTGRES_PASSWORD> | |
<POSTGRES_DB>hibernate_orm_test</POSTGRES_DB> | |
</env> | |
<ports> | |
<port>5431:5432</port> | |
</ports> | |
<wait> | |
<tcp> | |
<mode>mapped</mode> | |
<ports> | |
<port>5432</port> | |
</ports> | |
</tcp> | |
<time>10000</time> | |
</wait> | |
</run> | |
</image> | |
</images> | |
<!--Stops all postgres:10.5 images currently running, not just those we just started. | |
Useful to stop processes still running from a previously failed integration test run --> | |
<allContainers>true</allContainers> | |
</configuration> | |
<executions> | |
<execution> | |
<id>docker-start</id> | |
<phase>compile</phase> | |
<goals> | |
<goal>stop</goal> | |
<goal>start</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>docker-stop</id> | |
<phase>post-integration-test</phase> | |
<goals> | |
<goal>stop</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment