Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ ENV ASSEMBLER $FUSEKI_BASE/configuration/assembler.ttl
COPY assembler.ttl $ASSEMBLER
ENV CONFIG $FUSEKI_BASE/config.ttl
COPY fuseki-config.ttl $CONFIG
RUN mkdir -p $FUSEKI_BASE/databases
RUN mkdir -p \
$FUSEKI_BASE/backups \
$FUSEKI_BASE/databases

# Set permissions to allow fuseki to run as an arbitrary user
RUN chgrp -R 0 $FUSEKI_BASE \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Note: if you wish to add new datasets using the Fuseki admin UI - and persist th

Note 2: if you have the `assembler.ttl` file on a bind mount, using environment variables to enable Fuseki's endpoints (for writing data; see the Run section for details), e.g. `ENABLE_DATA_WRITE`, is not encouraged. Using both bind mount for the `assembler.ttl` file and e.g. `ENABLE_DATA_WRITE=true` causes a problem related to file permissions (`sed: couldn’t open temporary file /fuseki-base/configuration/sedXXX: Permission denied`) (which can be solved by either running the container as the root user or giving write permissions to the host directory that is mounted to the container; at least on Linux). The recommended way when having the `assembler.ttl` file on a bind mount is to edit the `assembler.ttl` file by hand to enable endpoints.

Note 3: if you wish to support persistent backups, you also need to use volume/bind mount for the directory `/fuseki-base/backups`. In containerized production environments, you might want to consider sharing this volume with a sidecar like [atmoz/sftp](https://hub.docker.com/r/atmoz/sftp), so backups can be moved offsite using something like [rclone](https://rclone.org/).

**Note on running in OpenShift**, if you use this image as a parent image (e.g. use your own Dockerfile to load the data inside the image using TDBLOADER): as containers are run as an arbitrary user, you'll have to ensure the write permission on the TDB and index directories, e.g. by adding the following lines in your Dockerfile after the tdbloader and indexing commands:

```
Expand Down