From: Kai Moritz <kai@juplo.de> Date: Tue, 3 Jul 2018 03:32:31 +0000 (+0200) Subject: Renamed the pom-properties and enabled the docker-build X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=7cd836b4071f8a10ffec85f0c8f5e593f77b1f2d;p=examples%2Ffacebook-app Renamed the pom-properties and enabled the docker-build --- diff --git a/pom.xml b/pom.xml index 510a4ff..b0f7f5d 100644 --- a/pom.xml +++ b/pom.xml @@ -25,20 +25,25 @@ <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> @@ -85,6 +90,42 @@ <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> diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index be5e940..53179d2 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -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-store: keystore -server.ssl.key-store-password: secret +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