diff --git a/Readme.md b/Readme.md index a79223c..3e0a84b 100644 --- a/Readme.md +++ b/Readme.md @@ -26,10 +26,35 @@ e.g., https://dev-5.pc:8443/server/listhandles/123456789 should work ## Installation production using provided images +1. pull image, recreate config (keys, ...), copy default configuration from the image ``` -docker run --rm -it ghcr.io/dataquest-dev/docker-handle-server:latest /bin/sh /app/hs/bin/hdl-setup-server . +IMG=ghcr.io/dataquest-dev/docker-handle-server:latest + +docker run --rm -it -v $(pwd):/app-share $IMG sh -c "cd /app/hs/bin/ && ./hdl-setup-server /app-share" +docker create --name temphs-plugin $IMG +docker cp temphs-plugin:/app/config/handle-dspace-plugin.cfg ./ +docker cp temphs-plugin:/app/config/log4j-handle-plugin.properties ./ +docker rm temphs-plugin +``` + +2. Update config.dct ``` +... + "server_config" = { + "storage_type" = "CUSTOM" + "storage_class" = "org.dspace.handle.MultiRemoteDSpaceRepositoryHandlePlugin" + + "server_admins" = ( +... +``` + +3. Start it + +``` +docker run --name hs --rm -v $(pwd):/app/config -p 8000:8000 $IMG sh -c "/app/hs/bin/hdl-server /app/config/" +``` +go to http://XXX:8000/ and test with a PID in this format, `11234/1-5419`. # Structure diff --git a/assets/config-debug/log4j-handle-plugin.properties b/assets/config-debug/log4j-handle-plugin.properties index fe7d979..062d35f 100644 --- a/assets/config-debug/log4j-handle-plugin.properties +++ b/assets/config-debug/log4j-handle-plugin.properties @@ -1,5 +1,11 @@ log4j.rootCategory=DEBUG, A1 + log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d %-5p %c @ %m%n + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%d %-5p %c @ %m%n + log4j.logger.org.apache.axis.handlers.http.HTTPAuthHandler=DEBUG \ No newline at end of file diff --git a/assets/config/log4j-handle-plugin.properties b/assets/config/log4j-handle-plugin.properties index b3484ef..2c8823c 100644 --- a/assets/config/log4j-handle-plugin.properties +++ b/assets/config/log4j-handle-plugin.properties @@ -1,7 +1,14 @@ -log4j.rootCategory=DEBUG, A1 +log4j.rootCategory=INFO, A1, console + log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender log4j.appender.A1.File=/app/logs/handle-plugin.log log4j.appender.A1.DatePattern= '.' yyyy-MM-dd log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d %-5p %c @ %m%n + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%d %-5p %c @ %m%n + + log4j.logger.org.apache.axis.handlers.http.HTTPAuthHandler=DEBUG \ No newline at end of file