@@ -19,7 +19,31 @@ Below environment variable(s) can be used to configure the connection to BaseX,
19
19
20
20
## Development
21
21
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
23
47
24
48
Check [ basexhttp on DockerHub] ( https://hub.docker.com/r/basex/basexhttp ) for a running BaseX docker container. This is
25
49
needed when running the SCL Data Service locally. Not needed to run the tests.
@@ -37,7 +61,7 @@ docker run --rm --name compas_basex \
37
61
> ** Note:** Replace <BASEX-DIR > with a directory on your local machine, for instance "~ /basex".
38
62
> All data will be stored in this directory under "data". This way data isn't lost after stopping the docker container.
39
63
40
- ### Application depends on a running KeyCloak instance
64
+ #### Application depends on a running KeyCloak instance
41
65
42
66
Beside a BaseX Database there is also a KeyCloak instance need to be running on port 8089 by default.
43
67
See [ README.md] ( ../README.md#security ) for default values, if custom keycloak is used.
@@ -59,34 +83,26 @@ docker run --rm --name compas_keycloak \
59
83
-d compas_keycloak:latest
60
84
```
61
85
62
- ### Building the application
86
+ ### Creating a Docker image with native executable
63
87
64
- You can run the following command to build the BaseX version of the application.
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:
65
91
66
92
``` shell script
67
- ./mvnw clean verify
93
+ ./mvnw package -Pnative-image
68
94
```
69
95
70
- ### Running the application in dev mode
71
-
72
- You can run your application in dev mode that enables live coding using:
73
-
74
- ``` shell script
75
- ./mvnw -DskipTests=true -Dquarkus.profile=dev-basex package io.quarkus:quarkus-maven-plugin::dev
76
- ```
96
+ You can then execute your native executable with: ` ./app/target/basex-quarkus-app/app-local-SNAPSHOT-runner `
77
97
78
- ### Creating a native executable
98
+ ### Creating a Docker image with JVM executable
79
99
80
- You can create a native executable using:
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:
81
102
82
103
``` shell script
83
- ./mvnw -P native package
104
+ ./mvnw package -Pjvm-image
84
105
```
85
106
86
- This will run the native executable build in a container. In the native profile the property
87
- "quarkus.native.container-build" is set to 'true'.
88
-
89
- You can then execute your native executable with: ` ./app/target/basex-quarkus-app/app-local-SNAPSHOT-runner `
90
-
91
- If you want to learn more about building native executables, please see https://quarkus.io/guides/maven-tooling.html
92
- and https://quarkus.io/guides/writing-native-applications-tips .
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