Skip to content

Commit

Permalink
Created a docker image for the MQTT package: fraunhoferiosb/frost-ser…
Browse files Browse the repository at this point in the history
…ver-mqtt.
  • Loading branch information
hylkevds committed Apr 11, 2018
1 parent eee48ef commit 1fdefdf
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -13,6 +13,10 @@ after_success:
- mvn dockerfile:tag@tag-version -pl FROST-Server.HTTP
- mvn dockerfile:push@push-latest -Ddockerfile.useMavenSettingsForAuth=true -pl FROST-Server.HTTP --settings travis-settings.xml
- mvn dockerfile:push@push-version -Ddockerfile.useMavenSettingsForAuth=true -pl FROST-Server.HTTP --settings travis-settings.xml
- mvn dockerfile:build -pl FROST-Server.MQTT
- mvn dockerfile:tag@tag-version -pl FROST-Server.MQTT
- mvn dockerfile:push@push-latest -Ddockerfile.useMavenSettingsForAuth=true -pl FROST-Server.MQTT --settings travis-settings.xml
- mvn dockerfile:push@push-version -Ddockerfile.useMavenSettingsForAuth=true -pl FROST-Server.MQTT --settings travis-settings.xml
sudo: required

services:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ Version 1.6 has not been released yet.
* Separated the MQTT and HTTP parts and created a stand-alone MQTT package.
There can be multiple MQTT and HTTP instances using the same database. The instances
communicate over a pluggable message bus. The default message bus uses MQTT.
* Created a docker image for the MQTT package: fraunhoferiosb/frost-server-mqtt.
* All configuration parameters can now be overridden using environment variables.

**Bugfixes**
Expand Down
10 changes: 10 additions & 0 deletions FROST-Server.MQTT/Dockerfile
@@ -0,0 +1,10 @@
FROM openjdk:8

EXPOSE 1883
EXPOSE 9876

# Copy to images tomcat path
ARG JAR_FILE
ADD target/${JAR_FILE} /usr/local/FROST/FROST-Mqtt.jar
WORKDIR /usr/local/FROST
CMD java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -jar FROST-Mqtt.jar
59 changes: 59 additions & 0 deletions FROST-Server.MQTT/pom.xml
Expand Up @@ -17,6 +17,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>de.fraunhofer.iosb.ilt.sta.FrostMqttServer</mainClass>
<docker-image-name>fraunhoferiosb/frost-server-mqtt</docker-image-name>
</properties>

<dependencies>
Expand Down Expand Up @@ -114,6 +115,64 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile-maven-plugin.version}</version>
<executions>
<execution>
<id>build-and-tag-latest</id>
<phase>none</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>tag-version</id>
<phase>none</phase>
<goals>
<goal>tag</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
</configuration>
</execution>
<execution>
<id>push-latest</id>
<phase>none</phase>
<goals>
<goal>push</goal>
</goals>
<configuration>
<tag>latest</tag>
</configuration>
</execution>
<execution>
<id>push-version</id>
<phase>none</phase>
<goals>
<goal>push</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
</configuration>
</execution>
</executions>
<configuration>
<repository>${docker-image-name}</repository>
<buildArgs>
<JAR_FILE>${project.build.finalName}-jar-with-dependencies.jar</JAR_FILE>
</buildArgs>
</configuration>
<dependencies>
<!-- Java 9 support -->
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${javax-activation.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 1fdefdf

Please sign in to comment.