29
29
30
30
<sect1 xml : id =" usage" >
31
31
<title >usage</title >
32
- <sect2 >
32
+ <para >Below a setup for exist-db for properties.</para >
33
+ <sect2 xml : id =" classpath" >
33
34
<title >Include exist-db-addons</title >
34
35
<para >For example in a Dockerfile:</para >
35
- <para >
36
- <programlisting >
36
+ <programlisting language =" Dockerfile" >
37
37
ARG EXISTADDONSERSION=1.7
38
38
COPY exist-db-addons-${EXISTADDONSERSION}.jar $EXIST_HOME/lib/
39
39
ENV CLASSPATH=$EXIST_HOME/lib/exist.uber.jar:$EXIST_HOME/lib/exist-db-addons-${EXISTADDONSERSION}.jar
40
40
</programlisting >
41
- </para >
42
41
</sect2 >
43
- <sect2 >
42
+ <sect2 xml : id = " conf.xml " >
44
43
<title >configure in conf.xml</title >
45
- <para ><programlisting language =" xml" ><![CDATA[
44
+ <para >add the module to exist:</para >
45
+ <programlisting language =" xml" ><![CDATA[
46
46
<module uri="http://exist-db.org/xquery/properties"
47
47
class="org.fryske_akademy.exist.properties.PropertiesModule">
48
48
<parameter name="basePath" value="/run/secrets"/>
49
49
</module>
50
50
]]>
51
- </programlisting ></ para >
51
+ </programlisting >
52
52
</sect2 >
53
- <sect2 >
53
+ <sect2 xml : id = " xquery " >
54
54
<title >use properties in xquery</title >
55
- <para ><programlisting >
55
+ <para >load and use properties in your xquery</para >
56
+ <programlisting language =" xquery" >
56
57
declare namespace properties="http://exist-db.org/xquery/properties";
57
58
58
59
declare variable $teidictjson:props := properties:loadProperties("teidictjson.properties");
@@ -63,19 +64,20 @@ declare function teidictjson:getProperty($key as xs:string, $default as xs:strin
63
64
else
64
65
$default
65
66
};
66
- </programlisting ></ para >
67
+ </programlisting >
67
68
</sect2 >
68
- <sect2 >
69
+ <sect2 xml : id = " docker-secret " >
69
70
<title >optionally mount properties as docker secret</title >
70
- <para >In docker-compose.yml: <programlisting >
71
+ <para >In docker-compose.yml:</para >
72
+ <programlisting language =" yaml" >
71
73
secrets:
72
74
- source: ${APPNAME}.properties
73
75
target: teidictjson.properties
74
76
mode: 0444
75
77
secrets:
76
78
fhwbjson.properties:
77
79
external: true
78
- </programlisting ></ para >
80
+ </programlisting >
79
81
</sect2 >
80
82
</sect1 >
81
83
0 commit comments