From fb88cf197d9fe814e9692e7dafdc0d31b940acbc Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 18 May 2022 16:30:41 +0200 Subject: 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. --- opendc-web/opendc-web-api/build.gradle.kts | 28 ++++++++++++++++++++++ .../opendc-web-api/config/application.properties | 1 + 2 files changed, 29 insertions(+) create mode 100644 opendc-web/opendc-web-api/config/application.properties 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 -- cgit v1.2.3