Changes

Jump to navigation Jump to search
121 bytes removed ,  15 February
no edit summary
to <code>UID 1984</code>:
<syntaxhighlightpre>
chown -R 1984 ~/my-project/data
</syntaxhighlightpre>
== Networking ==
An example for creating your own Docker image based on {{Code|basex/basexhttp}} is the [https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/webapp/dba DBA application]. A {{Code|Dockerfile}} was added to the source code’s root directory. The very simple file contains only few statements:
<syntaxhighlightpre>
FROM basex/basexhttp:latest
MAINTAINER BaseX Team <basex-talk@mailman.uni-konstanz.de>
COPY . /srv/basex/webapp
</syntaxhighlightpre>
For general production usage, you should choose a fixed version instead of the development branch behind {{Code|latest}}, so your application does not suddenly break because of unnoticed API changes. The most relevant part happens in the {{Code|COPY}} statement, which adds the file contents to the {{Code|webapp}} directory. That’s already it -- you’re ready to run.
If you need to adjust the BaseX configuration to tune the default [[Options|options]], add a {{Code|.basex}} file to {{Code|/srv}}:
<syntaxhighlightpre>
COPY .basex /srv/basex
</syntaxhighlightpre>
Options not defined in the {{Code|.basex}} file with be automatically set to the default values. Users and passwords can be defined by adding a {{Code|users.xml}} file, which is described on the [[User Management]] page.
Larger applications and databases might require adjusted JRE parameters like increasing the memory limit. You can change those by setting the {{Code|BASEX_JVM}} environment variable:
<syntaxhighlightpre>
ENV BASEX_JVM="-Xmx2048m"
</syntaxhighlightre>
===Installing Additional Packages===
In [https://alpinelinux.org alpine linux] you can add arbitrary software packages via APK. Make sure to switch to the {{Code|root}} user context before installing packages and back to the {{Code|basex}} user afterwards. As common in the Docker environment, you need to fetch the package catalog–in [https://alpinelinux.org alpine linux] this is done using {{Code|apk update}}–before installing packages and disable caching to keep the image small. The example installs {{Code|git}} as additional linux package:
<syntaxhighlightpre>
USER root
RUN apk update && apk add --no-cache git
USER basex
</syntaxhighlightpre>
Bureaucrats, editor, reviewer, Administrators
12,250

edits

Navigation menu