summaryrefslogtreecommitdiff
path: root/opendc-web
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-05-18 16:30:41 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-05-18 17:23:40 +0200
commitfb88cf197d9fe814e9692e7dafdc0d31b940acbc (patch)
tree8632e8e26e409b6909a0bd90488356b1dcd70ba6 /opendc-web
parent1489eefa18a904976f5328294c299df4285bacb4 (diff)
feat(web/api): Add initial server distribution
This change adds a distribution that contains the OpenDC web server implementation based on Quarkus. This distribution should be used by advanced users that whish to deploy a custom OpenDC instance.
Diffstat (limited to 'opendc-web')
-rw-r--r--opendc-web/opendc-web-api/build.gradle.kts28
-rw-r--r--opendc-web/opendc-web-api/config/application.properties1
2 files changed, 29 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-api/build.gradle.kts b/opendc-web/opendc-web-api/build.gradle.kts
index a9392229..89b8273c 100644
--- a/opendc-web/opendc-web-api/build.gradle.kts
+++ b/opendc-web/opendc-web-api/build.gradle.kts
@@ -25,6 +25,7 @@ description = "REST API for the OpenDC website"
/* Build configuration */
plugins {
`quarkus-conventions`
+ distribution
}
dependencies {
@@ -58,3 +59,30 @@ dependencies {
testImplementation(libs.quarkus.test.security)
testImplementation(libs.quarkus.jdbc.h2)
}
+
+val createStartScripts by tasks.creating(CreateStartScripts::class) {
+ applicationName = "opendc-server"
+ mainClass.set("io.quarkus.bootstrap.runner.QuarkusEntryPoint")
+ classpath = files("lib/quarkus-run.jar")
+ outputDir = project.buildDir.resolve("scripts")
+}
+
+distributions {
+ create("server") {
+ distributionBaseName.set("opendc-server")
+
+ contents {
+ from("../../LICENSE.txt")
+ from("config") {
+ into("config")
+ }
+
+ from(createStartScripts) {
+ into("bin")
+ }
+ from(tasks.quarkusBuild) {
+ into("lib")
+ }
+ }
+ }
+}
diff --git a/opendc-web/opendc-web-api/config/application.properties b/opendc-web/opendc-web-api/config/application.properties
new file mode 100644
index 00000000..30eaaef9
--- /dev/null
+++ b/opendc-web/opendc-web-api/config/application.properties
@@ -0,0 +1 @@
+# Custom server properties