diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d6a66cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine:3.15 +MAINTAINER Stephan Richter + +RUN apk add --no-cache --update bash git maven openjdk17 + +# get the sources +RUN git clone https://git.srsoftware.de/StephanRichter/Widerhall.git +WORKDIR Widerhall + +# compile +RUN mvn --no-transfer-progress clean test compile assembly:single +RUN ln -s target/*.jar widerhall.jar + +# configure +RUN mkdir /data +RUN echo '{"locations":{"database":"/data/widerhall.sqlite3","configuration":"/data/widerhall.config.json","archive":"/data/archive","base":"/Widerhall"}}' > config/config.json + +# get JQUERY +RUN wget https://code.jquery.com/jquery-3.6.0.min.js -O static/jquery-3.6.0.min.js + +CMD java -jar widerhall.jar \ No newline at end of file diff --git a/pom.xml b/pom.xml index 2a93c53..24df9ef 100644 --- a/pom.xml +++ b/pom.xml @@ -6,17 +6,32 @@ org.example Widerhall - 0.2.3 + 0.2.8 org.apache.maven.plugins maven-compiler-plugin + 3.10.1 16 16 + + maven-assembly-plugin + 3.3.0 + + + + de.srsoftware.widerhall.Application + + + + jar-with-dependencies + + + diff --git a/src/main/java/de/srsoftware/widerhall/Configuration.java b/src/main/java/de/srsoftware/widerhall/Configuration.java index 173ec76..9fe0a16 100644 --- a/src/main/java/de/srsoftware/widerhall/Configuration.java +++ b/src/main/java/de/srsoftware/widerhall/Configuration.java @@ -33,6 +33,7 @@ public class Configuration { public Configuration load(File file) { this.file = file; if (file.exists()) try { + LOG.info("Loading configuration from {}",file); var newVals = (JSONObject) new JSONParser().parse(Files.readString(file.toPath())); data.putAll(newVals); } catch (ParseException | IOException e){ diff --git a/src/test/java/de/srsoftware/widerhall/data/DatabaseTest.java b/src/test/java/de/srsoftware/widerhall/data/DatabaseTest.java index d51484c..3d3da66 100644 --- a/src/test/java/de/srsoftware/widerhall/data/DatabaseTest.java +++ b/src/test/java/de/srsoftware/widerhall/data/DatabaseTest.java @@ -54,4 +54,4 @@ public class DatabaseTest extends TestCase { assertEquals("UPDATE Test SET x = 5",Database.open().update("Test").set("x",5).compile().toString()); assertEquals("UPDATE Test SET x = 5, y = 6",Database.open().update("Test").set("x",5).set("y",6).compile().toString()); } -} \ No newline at end of file +} diff --git a/static/templates/css.st b/static/templates/css.st index 24211fc..606bcdb 100644 --- a/static/templates/css.st +++ b/static/templates/css.st @@ -3,7 +3,8 @@ label { margin: 5px 0; } -#login form { +#login form, +#register form{ width: 450px; margin: 0 auto; } diff --git a/static/templates/register.st b/static/templates/register.st index 98aa0c3..21e4252 100644 --- a/static/templates/register.st +++ b/static/templates/register.st @@ -6,7 +6,7 @@ - + «navigation()» «userinfo()»

Widerhall Nutzer-Registrierung