This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/master by this push:
     new 1308a7f  Improve docker build by proposing a docker-compose file to 
build and another one to use directly for simple setup.
1308a7f is described below

commit 1308a7ff38820a252a79b166266e4e468d3da4e5
Author: Serge Huber <[email protected]>
AuthorDate: Sun May 17 22:06:51 2020 +0200

    Improve docker build by proposing a docker-compose file to build and 
another one to use directly for simple setup.
---
 docker/pom.xml                                     | 30 +++++++++++++++++++---
 ...docker-compose.yml => docker-compose-build.yml} |  0
 docker/src/main/docker/docker-compose.yml          |  1 -
 3 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/docker/pom.xml b/docker/pom.xml
index 96db2bc..5ab084e 100644
--- a/docker/pom.xml
+++ b/docker/pom.xml
@@ -84,8 +84,8 @@
                                     
<directory>${project.basedir}/src/main/docker</directory>
                                     <filtering>true</filtering>
                                     <includes>
-                                        <include>Dockerfile</include>
                                         <include>docker-compose.yml</include>
+                                        
<include>docker-compose-build.yml</include>
                                     </includes>
                                 </resource>
                                 <!-- # Unfiltered Resources -->
@@ -93,8 +93,8 @@
                                     
<directory>${project.basedir}/src/main/docker</directory>
                                     <filtering>false</filtering>
                                     <excludes>
-                                        <exclude>Dockerfile</exclude>
                                         <exclude>docker-compose.yml</exclude>
+                                        
<include>docker-compose-build.yml</include>
                                     </excludes>
                                 </resource>
                             </resources>
@@ -115,7 +115,7 @@
                             <external>
                                 <type>compose</type>
                                 
<basedir>${project.build.directory}/filtered-docker</basedir>
-                                
<composeFile>${project.build.directory}/filtered-docker/docker-compose.yml</composeFile>
+                                
<composeFile>${project.build.directory}/filtered-docker/docker-compose-build.yml</composeFile>
                             </external>
                         </image>
                     </images>
@@ -129,6 +129,30 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>
+                                        
${project.build.directory}/filtered-docker/docker-compose.yml
+                                    </file>
+                                    <type>yml</type>
+                                    <classifier>docker-compose</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
diff --git a/docker/src/main/docker/docker-compose.yml 
b/docker/src/main/docker/docker-compose-build.yml
similarity index 100%
copy from docker/src/main/docker/docker-compose.yml
copy to docker/src/main/docker/docker-compose-build.yml
diff --git a/docker/src/main/docker/docker-compose.yml 
b/docker/src/main/docker/docker-compose.yml
index 58a8f6a..b40e342 100644
--- a/docker/src/main/docker/docker-compose.yml
+++ b/docker/src/main/docker/docker-compose.yml
@@ -30,7 +30,6 @@ services:
       - "9200:9200"
 
   unomi:
-    build: .
     image: apache/unomi:${project.version}
     container_name: unomi
     environment:

Reply via email to