@@ -19,7 +19,31 @@ Below environment variable(s) can be used to configure the connection to BaseX,
1919
2020## Development
2121
22- ### Application depends on a running BaseX instance
22+ ### Building the application
23+
24+ You can use Maven to build the application and see if all tests are working using:
25+
26+ ``` shell script
27+ ./mvnw clean verify
28+ ```
29+
30+ This should normally be enough to also run the application, but there were cases that we need to build using:
31+
32+ ``` shell script
33+ ./mvnw clean install
34+ ```
35+
36+ This to make the local modules available for the app module to run the application.
37+
38+ ### Running the application in dev mode
39+
40+ You can run your application in dev mode that enables live coding using:
41+
42+ ``` shell script
43+ ./mvnw -DskipTests=true -Dquarkus.profile=dev-basex package io.quarkus:quarkus-maven-plugin::dev
44+ ```
45+
46+ #### Application depends on a running BaseX instance
2347
2448Check [ basexhttp on DockerHub] ( https://hub.docker.com/r/basex/basexhttp ) for a running BaseX docker container. This is
2549needed when running the SCL Data Service locally. Not needed to run the tests.
@@ -37,34 +61,48 @@ docker run --rm --name compas_basex \
3761> ** Note:** Replace <BASEX-DIR > with a directory on your local machine, for instance "~ /basex".
3862> All data will be stored in this directory under "data". This way data isn't lost after stopping the docker container.
3963
40- ### Building the application
64+ #### Application depends on a running KeyCloak instance
4165
42- You can run the following command to build the BaseX version of the application.
66+ Beside a BaseX Database there is also a KeyCloak instance need to be running on port 8089 by default.
67+ See [ README.md] ( ../README.md#security ) for default values, if custom keycloak is used.
4368
44- ``` shell script
45- ./mvnw clean verify
46- ```
69+ There is a preconfigured keycloak instance available in
70+ the [ CoMPAS Deployment Repository ] ( https://github.com/com-pas/compas-deployment ) . This repository can be cloned and
71+ when going to this directory the following command can be executed to create a local Docker Image with configuration.
4772
48- ### Running the application in dev mode
73+ ``` shell
74+ cd < CoMPAS Deployment Repository Directory> /compas/keycloak
75+ docker build -t compas_keycloak .
76+ ```
4977
50- You can run your application in dev mode that enables live coding using:
78+ There is now a Docker Image ` compas_keycloak ` created that can be started using the following command
5179
52- ``` shell script
53- ./mvnw -DskipTests=true -Dquarkus.profile=dev-basex package io.quarkus:quarkus-maven-plugin::dev
80+ ``` shell
81+ docker run --rm --name compas_keycloak \
82+ -p 8089:8080
83+ -d compas_keycloak:latest
5484```
5585
56- ### Creating a native executable
86+ ### Creating a Docker image with native executable
5787
58- You can create a native executable using:
88+ The releases created in the repository will create a docker image with a native executable. If you're running a Linux
89+ system it's possible to create and run the executable locally. You can create a Docker image with native executable
90+ using:
5991
6092``` shell script
61- ./mvnw -P native package
93+ ./mvnw package -Pnative-image
6294```
6395
64- This will run the native executable build in a container. In the native profile the property
65- "quarkus.native.container-build" is set to 'true'.
66-
6796You can then execute your native executable with: ` ./app/target/basex-quarkus-app/app-local-SNAPSHOT-runner `
6897
69- If you want to learn more about building native executables, please see https://quarkus.io/guides/maven-tooling.html
70- and https://quarkus.io/guides/writing-native-applications-tips .
98+ ### Creating a Docker image with JVM executable
99+
100+ There is also a profile to create a Docker Image which runs the application using a JVM. You can create a Docker Image
101+ with JVM executable using:
102+
103+ ``` shell script
104+ ./mvnw package -Pjvm-image
105+ ```
106+
107+ The JVM Image can also (temporary) be created by the release action if there are problems creating or running the
108+ native executable.
0 commit comments