From 87d02bde4057b4d86f8950eba20bb5deee2d960b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Novotn=C3=BD?= Date: Wed, 27 Dec 2023 10:40:17 +0100 Subject: [PATCH] feat: updated distribution package contents --- .github/workflows/ci-master.yml | 4 +- evita_server/dist/logback.xml | 80 +++++++++++++++++++++++++++++++++ evita_server/dist/run.sh | 38 ++++++++++++++++ 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 evita_server/dist/logback.xml create mode 100755 evita_server/dist/run.sh diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 544fdfa1a..1158f7b4d 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -75,7 +75,9 @@ jobs: mkdir -p ./dist cp LICENSE ./dist cp 'evita_server/target/evita-server.jar' ./dist - cp 'docker/entrypoint.sh' './dist/run.sh' + cp 'evita_server/dist/run.sh' './dist' + cp 'evita_server/dist/logback.xml' './dist' + cp 'docker/evita-configuration.yaml' './dist' - name: Create .zip of dist uses: thedoctor0/zip-release@0.7.1 diff --git a/evita_server/dist/logback.xml b/evita_server/dist/logback.xml new file mode 100644 index 000000000..569b628aa --- /dev/null +++ b/evita_server/dist/logback.xml @@ -0,0 +1,80 @@ + + + + + + + System.err + + + WARN + + + %d{HH:mm:ss.SSS} %-5level %logger{10} - %msg%n + + + + + System.out + + + INFO + ACCEPT + DENY + + + %d{HH:mm:ss.SSS} %-5level %logger{10} - %msg%n + + + + + + logs/evita_server.log + + + %date %level [%thread] %logger{10} [%file:%line] -%kvp- %msg%n + + + + + + logs/evita_server_access.log + + + %msg%n + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/evita_server/dist/run.sh b/evita_server/dist/run.sh new file mode 100755 index 000000000..ab14fab11 --- /dev/null +++ b/evita_server/dist/run.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# +# +# _ _ ____ ____ +# _____ _(_) |_ __ _| _ \| __ ) +# / _ \ \ / / | __/ _` | | | | _ \ +# | __/\ V /| | || (_| | |_| | |_) | +# \___| \_/ |_|\__\__,_|____/|____/ +# +# Copyright (c) 2023 +# +# Licensed under the Business Source License, Version 1.1 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://github.com/FgForrest/evitaDB/blob/main/LICENSE +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set -e + +if [ "$1" = "" ]; then + set -x + exec java \ + $EVITA_JAVA_OPTS \ + -jar "evita-server.jar" \ + "-Dstorage.storageDirectory=data" \ + "-Dapi.certificate.folderPath=certificates" \ + "-Dlogback.configurationFile=logback.xml" \ + $EVITA_ARGS +else + exec "$@" +fi