This is an automated email from the ASF dual-hosted git repository. shuber pushed a commit to branch unomi-1.5.x in repository https://gitbox.apache.org/repos/asf/unomi.git
commit 3ef36287bbf2d2836e3422b6ec1a71e263d9ca92 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. (cherry picked from commit 1308a7ff38820a252a79b166266e4e468d3da4e5) --- 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 3dac658..c1cd479 100644 --- a/docker/pom.xml +++ b/docker/pom.xml @@ -83,8 +83,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 --> @@ -92,8 +92,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> @@ -114,7 +114,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> @@ -128,6 +128,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:
