Skip to content

Commit

Permalink
updated after prod deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jm committed Sep 6, 2024
1 parent 8558bba commit 5a702a1
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
27 changes: 26 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions assets/config-debug/log4j-handle-plugin.properties
Original file line number Diff line number Diff line change
@@ -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
9 changes: 8 additions & 1 deletion assets/config/log4j-handle-plugin.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5a702a1

Please sign in to comment.