changeset 9760:9bbb29142ddb 3.2.x

Give hints for remote debugging artifact server
author Tom Gottfried <tom@intevation.de>
date Thu, 10 Nov 2022 15:42:16 +0100
parents a83029cc7e6a
children c088f7a5797d
files artifacts/bin/run.sh docker/README docker/docker-compose.yml
diffstat 3 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/bin/run.sh	Thu Nov 10 15:39:07 2022 +0100
+++ b/artifacts/bin/run.sh	Thu Nov 10 15:42:16 2022 +0100
@@ -12,7 +12,7 @@
 
 export CLASSPATH
 
-exec java -Xmx1024m \
+exec java $JAVA_OPTS -Xmx1024m \
      -server \
      -Djava.awt.headless=true \
      -Dflys.datacage.recommendations.development=false \
--- a/docker/README	Thu Nov 10 15:39:07 2022 +0100
+++ b/docker/README	Thu Nov 10 15:42:16 2022 +0100
@@ -15,6 +15,14 @@
 See docker/flys_user_file for credentials.
 
 
+Remote debugging:
+
+To enable remote debugging of the artifact server, uncomment the respective
+lines in docker-compose.yml, recreate the service and e.g. attach with JDB:
+$ docker-compose up -d
+$ jdb -attach <your-docker-host>:8787 -sourcepath<your-checkout>/artifacts/src/main/java
+
+
 TODO:
 _ Avoid having to change configuration manually
 _ Something better than setting framework and http-client to a branch
--- a/docker/docker-compose.yml	Thu Nov 10 15:39:07 2022 +0100
+++ b/docker/docker-compose.yml	Thu Nov 10 15:42:16 2022 +0100
@@ -21,6 +21,11 @@
     volumes:
       - ../artifacts/doc/conf:/opt/d4e/bin/conf
       - artifacts-data:/opt/d4e/bin/artifacts-data
+    # Uncomment to enable remote debugging from anywhere (caution: security risk!)
+    # environment:
+    #   - JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8787
+    # ports:
+    #   - 8787:8787
   mapserv:
     container_name: "d4eriver-mapserv"
     build:

http://dive4elements.wald.intevation.org