Set JVM for alfresco_acs in the docker-compose.yml

cancel
Showing results for 
Search instead for 
Did you mean: 
mangar
Established Member II

Set JVM for alfresco_acs in the docker-compose.yml

I am trying to up the memory usage for my alfesco_acs.   I started with the standard SDK install and have been adding my own stuff.  I have researched docker_compose and seen may ways to set the JDK memory but none seem to work on my alfresco setup.  I have a 32G Ubuntu, and I want to give the bulk of that to alfresco when it's running.  I adjusted the docker container like this:

  alfresco-acs:
    image: alfresco-content-services-alfresco:development
    deploy:
      resources:
        limits:
          memory: 28000M
        reservations:
          memory: 12000M

and I am trying to set the JAVA_OPTS lie this:

    environment:
      JVM_OPTS: "%JAVA_OPTS% -Xmx25g -Xms12g -XX:MaxPermSize=1024m"
      JAVA_TOOL_OPTIONS: "${keystore.settings}"
      CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888;"
 

but to no avail.  I keep getting this when I do the ./run.sh build_start

alfresco-acs_1    | Usage: java [options] <mainclass> [args...]
alfresco-acs_1    |            (to execute a class)
alfresco-acs_1    |    or  java [options] -jar <jarfile> [args...]
alfresco-acs_1    |            (to execute a jar file)
alfre_OPTSsco-acs_1    |    or  java [options] -m <module>[/<mainclass>] [args...]
alfresco-acs_1    |        java [options] --module <module>[/<mainclass>] [args...]
alfresco-acs_1    |            (to execute the main class in a module)
alfresco-acs_1    |    or  java [options] <sourcefile> [args]
alfresco-acs_1    |            (to execute a single source-file program)

And of course it fails to come up.  I have tried setting options in the CATALINA_OPTS  but all my attempts fail.

 

How do I do this?

1 Reply
afaust
Master

Re: Set JVM for alfresco_acs in the docker-compose.yml

%JAVA_OPTS%

is a Windows style variable placeholder which does not work in Linux-based Docker images. The default Alfresco images also expect you to set JAVA_OPTS directly instead of via the JVM_OPTS, without including any placeholder.