Skip to content

Instantly share code, notes, and snippets.

@olbpetersson
Created November 21, 2015 23:30
Show Gist options
  • Save olbpetersson/077a0985041f4d11b40a to your computer and use it in GitHub Desktop.
Save olbpetersson/077a0985041f4d11b40a to your computer and use it in GitHub Desktop.
<execution>
<phase>pre-integration-test</phase>
<id>start</id>
<goals>
<goal>start-containers</goal>
</goals>
<configuration>
<!-- You can set forceCleanup to true to stop and remove started containers
at the end of the build even if the stop-containers goal is not executed
(useful for preventing Ctrl+C causing dangling containers) -->
<forceCleanup>false</forceCleanup>
<containers>
<container>
<id>mongodb</id>
<image>mongo:3.2</image>
<hostname>mongodb</hostname>
<env>
<MONGO_HOST>${docker.containers.mongodb.ports.27017/tcp.host}</MONGO_HOST>
<MONGO_PORT>${docker.containers.mongodb.ports.27017/tcp.port}</MONGO_PORT>
</env>
<!--<waitForStartup>waiting for connections on port 27017</waitForStartup>-->
</container>
<container>
<id>spring-boot</id>
<image>${docker.image.prefix}-spring-boot/${project.artifactId}</image>
<hostname>${docker.image.prefix}-spring-boot/${project.artifactId}</hostname>
<links>
<link>
<containerId>mongodb</containerId>
<containerAlias>mongodb</containerAlias>
</link>
</links>
<env>
<MONGO_HOST>${docker.containers.mongodb.ports.27017/tcp.host}</MONGO_HOST>
<MONGO_PORT>${docker.containers.mongodb.ports.27017/tcp.port}</MONGO_PORT>
</env>
<!--<waitForStartup>Started ReactiveApplication in</waitForStartup>-->
</container>
</containers>
</configuration>
</execution>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment