Dockerfile.test and docker-compose: expose port 8000, set JDWP java opts

This allows a remote JVM debugger to be connected to port 8000 on the
dspace docker container (test environment).
This may need a documentation note to warn against running the supplied
docker-compose / Dockerfile.test config in production -- already a good
warning but made more important now that the JVM can be exposed to a
debugger for reading memory...
This commit is contained in:
Kim Shepherd
2022-05-25 10:40:18 +12:00
parent 30f923a080
commit e08fa2ec31
2 changed files with 4 additions and 2 deletions

View File

@@ -58,9 +58,9 @@ COPY --from=ant_build /dspace $DSPACE_INSTALL
# NOTE: secretRequired="false" should only be used when AJP is NOT accessible from an external network. But, secretRequired="true" isn't supported by mod_proxy_ajp until Apache 2.5
RUN sed -i '/Service name="Catalina".*/a \\n <Connector protocol="AJP/1.3" port="8009" address="0.0.0.0" redirectPort="8443" URIEncoding="UTF-8" secretRequired="false" />' $TOMCAT_INSTALL/conf/server.xml
# Expose Tomcat port and AJP port
EXPOSE 8080 8009
EXPOSE 8080 8009 8000
# Give java extra memory (2GB)
ENV JAVA_OPTS=-Xmx2000m
ENV JAVA_OPTS=-Xmx2000m\ -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000
# Link the DSpace 'server' webapp into Tomcat's webapps directory.
# This ensures that when we start Tomcat, it runs from /server path (e.g. http://localhost:8080/server/)

View File

@@ -41,6 +41,8 @@ services:
target: 8080
- published: 8009
target: 8009
- published: 8000
target: 8000
stdin_open: true
tty: true
volumes: