File tree 5 files changed +75
-7
lines changed
frameworks/Kotlin/hexagon
5 files changed +75
-7
lines changed Original file line number Diff line number Diff line change 25
25
"notes" : " http://hexagonkt.com" ,
26
26
"versus" : " servlet"
27
27
},
28
+ "blackbird" : {
29
+ "json_url" : " /json" ,
30
+ "db_url" : " /postgresql/db" ,
31
+ "query_url" : " /postgresql/query?queries=" ,
32
+ "fortune_url" : " /postgresql/pebble/fortunes" ,
33
+ "update_url" : " /postgresql/update?queries=" ,
34
+ "cached_query_url" : " /postgresql/cached?count=" ,
35
+ "plaintext_url" : " /plaintext" ,
36
+ "port" : 9090 ,
37
+ "approach" : " Realistic" ,
38
+ "classification" : " Micro" ,
39
+ "database" : " postgres" ,
40
+ "framework" : " Hexagon" ,
41
+ "language" : " Kotlin" ,
42
+ "orm" : " Raw" ,
43
+ "platform" : " Servlet" ,
44
+ "webserver" : " None" ,
45
+ "os" : " Linux" ,
46
+ "database_os" : " Linux" ,
47
+ "display_name" : " Hexagon Jetty PostgreSQL" ,
48
+ "notes" : " http://hexagonkt.com" ,
49
+ "versus" : " servlet"
50
+ },
28
51
"resin" : {
29
52
"json_url" : " /json" ,
30
53
"db_url" : " /postgresql/db" ,
Original file line number Diff line number Diff line change 1
1
2
2
plugins {
3
- id " org.jetbrains.kotlin.jvm" version " 1.5.21 "
3
+ id " org.jetbrains.kotlin.jvm" version " 1.5.31 "
4
4
}
5
5
6
6
ext {
7
- gradleScripts = " https://raw.githubusercontent.com/hexagonkt/hexagon/1.4.2 /gradle"
7
+ gradleScripts = " https://raw.githubusercontent.com/hexagonkt/hexagon/1.4.7 /gradle"
8
8
9
- hexagonVersion = " 1.4.2 "
9
+ hexagonVersion = " 1.4.7 "
10
10
hikariVersion = " 5.0.0"
11
- jettyVersion = " 10.0.6 "
12
- postgresqlVersion = " 42.2.23 "
11
+ jettyVersion = " 10.0.7 "
12
+ postgresqlVersion = " 42.2.24 "
13
13
cache2kVersion = " 2.2.1.Final"
14
- jacksonBlackbirdVersion = " 2.12.4 "
14
+ jacksonBlackbirdVersion = " 2.13.0 "
15
15
}
16
16
17
17
apply(from : " $gradleScripts /kotlin.gradle" )
Original file line number Diff line number Diff line change @@ -19,6 +19,24 @@ platform = "Servlet"
19
19
webserver = " None"
20
20
versus = " servlet"
21
21
22
+ [blackbird ]
23
+ urls.plaintext = " /plaintext"
24
+ urls.json = " /json"
25
+ urls.db = " /postgresql/db"
26
+ urls.query = " /postgresql/query?queries="
27
+ urls.update = " /postgresql/update?queries="
28
+ urls.fortune = " /postgresql/pebble/fortunes"
29
+ urls.cached_query = " /postgresql/cached?count="
30
+ approach = " Realistic"
31
+ classification = " Micro"
32
+ database = " postgres"
33
+ database_os = " Linux"
34
+ os = " Linux"
35
+ orm = " Raw"
36
+ platform = " Servlet"
37
+ webserver = " None"
38
+ versus = " servlet"
39
+
22
40
[resin ]
23
41
urls.plaintext = " /plaintext"
24
42
urls.json = " /json"
Original file line number Diff line number Diff line change
1
+ #
2
+ # BUILD
3
+ #
4
+ FROM gradle:7.2-jdk11 AS gradle_build
5
+ USER root
6
+ WORKDIR /hexagon
7
+
8
+ COPY src src
9
+ COPY build.gradle build.gradle
10
+ RUN gradle --quiet
11
+
12
+ #
13
+ # RUNTIME
14
+ #
15
+ FROM adoptopenjdk:11-jre-hotspot-bionic
16
+ ENV DBSTORE postgresql
17
+ ENV POSTGRESQL_DB_HOST tfb-database
18
+ ENV WEBENGINE jetty
19
+ ENV PROJECT hexagon
20
+ ENV ENABLE_BLACKBIRD true
21
+
22
+ COPY --from=gradle_build /hexagon/build/install/$PROJECT /opt/$PROJECT
23
+
24
+ EXPOSE 9090
25
+
26
+ ENTRYPOINT /opt/$PROJECT/bin/$PROJECT
Original file line number Diff line number Diff line change 1
1
package com.hexagonkt
2
2
3
3
import com.fasterxml.jackson.module.blackbird.BlackbirdModule
4
+ import com.hexagonkt.helpers.Jvm
4
5
import com.hexagonkt.http.server.Server
5
6
import com.hexagonkt.http.server.ServerPort
6
7
import com.hexagonkt.http.server.ServerSettings
@@ -36,7 +37,7 @@ internal val benchmarkServer: Server by lazy {
36
37
}
37
38
38
39
fun main () {
39
- if (System .getenv().containsKey (" ENABLE_BLACKBIRD" ))
40
+ if (Jvm .systemFlag (" ENABLE_BLACKBIRD" ))
40
41
Json .mapper.registerModule(BlackbirdModule ())
41
42
SerializationManager .mapper = JacksonMapper
42
43
SerializationManager .formats = linkedSetOf(Json )
You can’t perform that action at this time.
0 commit comments