Renamed the pom-properties and enabled the docker-build
authorKai Moritz <kai@juplo.de>
Tue, 3 Jul 2018 03:32:31 +0000 (05:32 +0200)
committerKai Moritz <kai@juplo.de>
Tue, 3 Jul 2018 14:48:02 +0000 (16:48 +0200)
pom.xml
src/main/resources/application.properties

diff --git a/pom.xml b/pom.xml
index 510a4ff..b0f7f5d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 
   <properties>
     <java.version>1.8</java.version>
+    <!-- app settings -->
+    <yourshouter.facebook.app.server.port>8443</yourshouter.facebook.app.server.port>
+    <yourshouter.facebook.app.server.language>de</yourshouter.facebook.app.server.language>
+    <yourshouter.facebook.app.server.country>DE</yourshouter.facebook.app.server.country>
+    <yourshouter.facebook.app.server.timezone>Europe/Berlin</yourshouter.facebook.app.server.timezone>
     <!-- settings for the Graph-API -->
-    <facebook.app.id>NOT_SET</facebook.app.id>
-    <facebook.app.secret>NOT_SET</facebook.app.secret>
-    <facebook.app.canvas>NOT_SET</facebook.app.canvas>
+    <yourshouter.facebook.app.client.id>NOT_SET</yourshouter.facebook.app.client.id>
+    <yourshouter.facebook.app.client.secret>NOT_SET</yourshouter.facebook.app.client.secret>
+    <yourshouter.facebook.app.client.canvas>NOT_SET</yourshouter.facebook.app.client.canvas>
     <!-- settings for the Apache Commons Http-Client -->
-    <httpclient.timeout.connection>60000</httpclient.timeout.connection>
-    <httpclient.timeout.read>60000</httpclient.timeout.read>
-    <httpclient.logging.level>ERROR</httpclient.logging.level>
+    <yourshouter.facebook.app.httpclient.timeout.connection>60000</yourshouter.facebook.app.httpclient.timeout.connection>
+    <yourshouter.facebook.app.httpclient.timeout.read>60000</yourshouter.facebook.app.httpclient.timeout.read>
+    <yourshouter.facebook.app.httpclient.logging.level>ERROR</yourshouter.facebook.app.httpclient.logging.level>
     <!-- database settings for tests -->
-    <jdbc.groupId>com.h2database</jdbc.groupId>
-    <jdbc.artifactId>h2</jdbc.artifactId>
-    <jdbc.url><![CDATA[jdbc:h2:~/test;DB_CLOSE_ON_EXIT=FALSE]]></jdbc.url>
-    <jdbc.username>sa</jdbc.username>
-    <jdbc.password></jdbc.password>
+    <yourshouter.facebook.app.jdbc.groupId>com.h2database</yourshouter.facebook.app.jdbc.groupId>
+    <yourshouter.facebook.app.jdbc.artifactId>h2</yourshouter.facebook.app.jdbc.artifactId>
+    <yourshouter.facebook.app.jdbc.url><![CDATA[jdbc:h2:~/test;DB_CLOSE_ON_EXIT=FALSE]]></yourshouter.facebook.app.jdbc.url>
+    <yourshouter.facebook.app.jdbc.username>sa</yourshouter.facebook.app.jdbc.username>
+    <yourshouter.facebook.app.jdbc.password></yourshouter.facebook.app.jdbc.password>
   </properties>
 
   <dependencies>
@@ -73,8 +78,8 @@
       <artifactId>spring-boot-starter-data-jpa</artifactId>
     </dependency>
     <dependency>
-      <groupId>${jdbc.groupId}</groupId>
-      <artifactId>${jdbc.artifactId}</artifactId>
+      <groupId>${yourshouter.facebook.app.jdbc.groupId}</groupId>
+      <artifactId>${yourshouter.facebook.app.jdbc.artifactId}</artifactId>
       <scope>runtime</scope>
     </dependency>
   </dependencies>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>io.fabric8</groupId>
+        <artifactId>docker-maven-plugin</artifactId>
+        <version>0.26.0</version>
+        <configuration>
+          <images>
+            <image>
+              <name>yourshouter/%a:%v</name>
+              <build>
+                <from>openjdk:8-jre-alpine</from>
+                <maintainer>kai@yourshouter.com</maintainer>
+                <tags>
+                  <tag>${project.version}</tag>
+                </tags>
+                <ports>
+                  <port>${yourshouter.facebook.app.server.port}/tcp</port>
+                </ports>
+                <entryPoint>
+                  <!-- exec form for ENTRYPOINT -->
+                  <exec>
+                    <arg>java</arg>
+                    <arg>-Duser.language=${yourshouter.api.language}</arg>
+                    <arg>-Duser.country=${yourshouter.api.country}</arg>
+                    <arg>-Duser.timezone=${yourshouter.api.timezone}</arg>
+                    <arg>-jar</arg>
+                    <arg>/maven/${project.build.finalName}.jar</arg>
+                  </exec>
+                </entryPoint>
+                <assembly>
+                  <descriptorRef>artifact</descriptorRef>
+                </assembly>
+              </build>
+            </image>
+          </images>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
index be5e940..53179d2 100644 (file)
@@ -1,24 +1,24 @@
-facebook.app.id=@facebook.app.id@
-facebook.app.secret=@facebook.app.secret@
-facebook.app.canvas=@facebook.app.canvas@
+facebook.app.id=@yourshouter.facebook.app.client.id@
+facebook.app.secret=@yourshouter.facebook.app.client.secret@
+facebook.app.canvas=@yourshouter.facebook.app.client.canvas@
 
-server.port: 8443
-server.ssl.key-storekeystore
-server.ssl.key-store-passwordsecret
+server.port=@yourshouter.facebook.app.server.port@
+server.ssl.key-store=keystore
+server.ssl.key-store-password=secret
 
-httpclient.timeout.connection=@httpclient.timeout.connection@
-httpclient.timeout.read=@httpclient.timeout.read@
+httpclient.timeout.connection=@yourshouter.facebook.app.httpclient.timeout.connection@
+httpclient.timeout.read=@yourshouter.facebook.app.httpclient.timeout.read@
 
 spring.thymeleaf.prefix=/thymeleaf/
 spring.thymeleaf.cache=false
 
-spring.datasource.url=@jdbc.url@
-spring.datasource.username=@jdbc.username@
-spring.datasource.password=@jdbc.password@
+spring.datasource.url=@yourshouter.facebook.app.jdbc.url@
+spring.datasource.username=@yourshouter.facebook.app.jdbc.username@
+spring.datasource.password=@yourshouter.facebook.app.jdbc.password@
 spring.datasource.continueOnError=true
 spring.h2.console.enabled=true
 
 logging.level.org.springframework.social=debug
-logging.level.org.apache.http=@httpclient.logging.level@
+logging.level.org.apache.http=@yourshouter.facebook.app.httpclient.logging.level@
 logging.level.org.apache.http.wire=ERROR
 logging.level.de.juplo.yourshouter=info