Skip to content

Commit 9d7d740

Browse files
committed
Automate example Docker build and deploy
1 parent 1c2b552 commit 9d7d740

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

graphql-jpa-query-example/pom.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,30 @@
5151
<groupId>com.spotify</groupId>
5252
<artifactId>docker-maven-plugin</artifactId>
5353
<version>0.4.14</version>
54+
<executions>
55+
<execution>
56+
<id>build-image</id>
57+
<phase>package</phase>
58+
<goals>
59+
<goal>build</goal>
60+
</goals>
61+
</execution>
62+
<execution>
63+
<id>push-image</id>
64+
<phase>deploy</phase>
65+
<goals>
66+
<goal>push</goal>
67+
</goals>
68+
<configuration>
69+
<pushImage>true</pushImage>
70+
</configuration>
71+
</execution>
72+
</executions>
5473
<configuration>
5574
<serverId>docker-hub</serverId>
5675
<registryUrl>https://index.docker.io/v1/</registryUrl>
5776
<imageName>introproventures/${project.artifactId}</imageName>
58-
<dockerDirectory>src/main/docker</dockerDirectory>
77+
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
5978
<resources>
6079
<resource>
6180
<targetPath>/</targetPath>

0 commit comments

Comments
 (0)