-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KMS-516: Implement CRUD for SKOS concepts (#10)
* KMS-516: Support for CRUDing SKOS concepts --------- Co-authored-by: Christopher Gokey <[email protected]>
- Loading branch information
Showing
72 changed files
with
340,075 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,5 @@ junit.xml | |
|
||
cmr | ||
cdk.context.json | ||
cdk.out | ||
infrastructure/rdfdb/cdk/cdk.context.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM node:18-bullseye | ||
COPY . /build | ||
WORKDIR /build | ||
RUN npm ci --omit=dev && npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM eclipse/rdf4j-workbench:latest | ||
USER root | ||
|
||
# Create the directory for EFS mount and set permissions | ||
RUN mkdir -p /rdf4j-data | ||
RUN chown -R tomcat:nogroup /rdf4j-data | ||
RUN chmod -R 755 /rdf4j-data | ||
|
||
# Set the RDF4J data directory | ||
ENV RDF4J_DATA_DIR=/rdf4j-data | ||
|
||
# Install necessary tools | ||
RUN apt-get update && apt-get install -y unzip zip liblmdb-dev lmdb-utils | ||
|
||
# Copy configuration files | ||
COPY config/tomcat-users.xml /usr/local/tomcat/conf/tomcat-users.xml | ||
|
||
# Copy scripts | ||
COPY scripts/setup.sh /usr/local/tomcat/setup.sh | ||
COPY scripts/setup_web_auth.sh /usr/local/tomcat/setup_web_auth.sh | ||
COPY scripts/create_repository.sh /usr/local/tomcat/create_repository.sh | ||
|
||
RUN chown -R tomcat:nogroup /usr/local/tomcat | ||
# Uncomment the line below to include rdf4j workbench, which is is a web-based | ||
# user interface that provides a graphical way to interact with and manage | ||
# RDF4J repositories. To access it, go here: http://localhost:8080/rdf4j-workbench | ||
# RUN rm -r /usr/local/tomcat/webapps/rdf4j-workbench* | ||
|
||
# We'll keep the container running as root to allow permission changes at runtime | ||
# The entrypoint script will switch to the tomcat user | ||
|
||
# Set correct permissions | ||
RUN chown -R tomcat:nogroup /rdf4j-data | ||
RUN chmod -R 755 /rdf4j-data | ||
|
||
USER tomcat | ||
|
||
# Use the new entrypoint script | ||
CMD ["/usr/local/tomcat/setup.sh"] |
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
infrastructure/rdfdb/cdk/docker/data/server/conf/logback.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration debug="false" scan="true" scanPeriod="30 seconds"> | ||
<appender name="MainLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>${org.eclipse.rdf4j.common.logging.dir}/main.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<fileNamePattern>${org.eclipse.rdf4j.common.logging.dir}/main-%d{yyyy-MM-dd}.log</fileNamePattern> | ||
</rollingPolicy> | ||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> | ||
<layout class="org.eclipse.rdf4j.common.logging.file.logback.StackTracePatternLayout"/> | ||
<charset>UTF-8</charset> | ||
</encoder> | ||
<logreader class="org.eclipse.rdf4j.common.logging.file.logback.FileLogReader" default="true"/> | ||
</appender> | ||
<root> | ||
<level value="INFO"/> | ||
<appender-ref ref="MainLog"/> | ||
</root> | ||
</configuration> |
42 changes: 42 additions & 0 deletions
42
infrastructure/rdfdb/cdk/docker/scripts/create_repository.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# Function to create repository | ||
create_repository() { | ||
# Wait for RDF4J server to be up | ||
until curl --output /dev/null --silent --fail http://localhost:8080/rdf4j-server/protocol; do | ||
echo "Waiting for RDF4J server to be ready..." | ||
sleep 5 | ||
done | ||
|
||
if [ ! -d "${RDF4J_DATA_DIR}/server/repositories/kms" ]; then | ||
# Create the repository | ||
echo "Repository 'kms' does not exist. Creating it..." | ||
curl -u rdf4j:rdf4j -X PUT -H "Content-Type: application/x-turtle" --data-binary ' | ||
# | ||
# RDF4J configuration template for a main-memory repository | ||
# | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix config: <tag:rdf4j.org,2023:config/>. | ||
[] a config:Repository ; | ||
config:rep.id "kms" ; | ||
rdfs:label "kms" ; | ||
config:rep.impl [ | ||
config:rep.type "openrdf:SailRepository" ; | ||
config:sail.impl [ | ||
config:sail.type "openrdf:NativeStore" ; | ||
config:native.forceSync: true ; | ||
config:sail.memory "false" ; | ||
config:sail.reindex "true" ; | ||
config:sail.writeThrough "true" ; | ||
] | ||
]. | ||
' http://localhost:8080/rdf4j-server/repositories/kms | ||
echo "Repository created successfully" | ||
else | ||
echo "Repository 'kms' already exists. Skipping creation." | ||
fi | ||
} | ||
|
||
# Call the function | ||
create_repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.