Jump to navigation Jump to search
121 bytes removed ,  12:16, 15 February 2021
no edit summary
to <code>UID 1984</code>:
chown -R 1984 ~/my-project/data
== Networking ==
An example for creating your own Docker image based on {{Code|basex/basexhttp}} is the [ DBA application]. A {{Code|Dockerfile}} was added to the source code’s root directory. The very simple file contains only few statements:
FROM basex/basexhttp:latest
COPY . /srv/basex/webapp
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}}:
COPY .basex /srv/basex
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:
ENV BASEX_JVM="-Xmx2048m"
===Installing Additional Packages===
In [ 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 [ 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:
USER root
RUN apk update && apk add --no-cache git
USER basex
Bureaucrats, editor, reviewer, Administrators


Navigation menu