Skip to content

Commit

Permalink
Avoid OOM on older compose versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Jan 22, 2024
1 parent c7b08d4 commit 3eeca37
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docker-compose/7.0.N-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#
# Using version 2 as 3 does not support resource constraint options
# (cpu_*, mem_* limits) for non swarm mode in Compose
#
# Java processes requires setting -XX:MaxRAM= due to cgroupv2 changes in recent Linux kernels
# https://hub.alfresco.com/t5/alfresco-content-services-blog/acs-containers-and-cgroup-v2-in-acs-up-to-7-2/ba-p/318039
version: "2"
services:
alfresco:
Expand Down Expand Up @@ -55,13 +58,15 @@ services:
-Ddsync.service.uris=http://localhost:9090/alfresco
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1700m
transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:1.4.1
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=512m
ACTIVEMQ_URL: nio://activemq:61616
CORE_AIO_URL: http://transform-core-aio:8090
FILE_STORE_URL: >-
Expand All @@ -77,6 +82,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1536m
ACTIVEMQ_URL: "nio://activemq:61616"
FILE_STORE_URL: >-
http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file
Expand All @@ -91,6 +97,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=512m
scheduler.content.age.millis: 86400000
scheduler.cleanup.interval: 86400000
ports:
Expand All @@ -106,6 +113,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1g
-Dalfresco.host=localhost
-Dalfresco.port=8080
-Dalfresco.context=alfresco
Expand Down Expand Up @@ -177,6 +185,7 @@ services:
-Ddw.server.applicationConnectors[0].type=http
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1g
ports:
- "9090:9090"
volumes:
Expand Down
9 changes: 9 additions & 0 deletions docker-compose/7.1.N-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#
# Using version 2 as 3 does not support resource constraint options
# (cpu_*, mem_* limits) for non swarm mode in Compose
#
# Java processes requires setting -XX:MaxRAM= due to cgroupv2 changes in recent Linux kernels
# https://hub.alfresco.com/t5/alfresco-content-services-blog/acs-containers-and-cgroup-v2-in-acs-up-to-7-2/ba-p/318039
version: "2"
services:
alfresco:
Expand Down Expand Up @@ -55,13 +58,15 @@ services:
-Ddsync.service.uris=http://localhost:9090/alfresco
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1900m
transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:2.1.1
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=512m
ACTIVEMQ_URL: nio://activemq:61616
CORE_AIO_URL: http://transform-core-aio:8090
FILE_STORE_URL: >-
Expand All @@ -77,6 +82,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1536m
ACTIVEMQ_URL: nio://activemq:61616
FILE_STORE_URL: >-
http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file
Expand All @@ -91,6 +97,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=512m
scheduler.content.age.millis: 86400000
scheduler.cleanup.interval: 86400000
ports:
Expand All @@ -106,6 +113,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1g
-Dalfresco.host=localhost
-Dalfresco.port=8080
-Dalfresco.context=alfresco
Expand Down Expand Up @@ -178,6 +186,7 @@ services:
-Ddw.server.applicationConnectors[0].type=http
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1g
ports:
- "9090:9090"
volumes:
Expand Down
9 changes: 9 additions & 0 deletions docker-compose/7.2.N-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#
# Using version 2 as 3 does not support resource constraint options
# (cpu_*, mem_* limits) for non swarm mode in Compose
#
# Java processes requires setting -XX:MaxRAM= due to cgroupv2 changes in recent Linux kernels
# https://hub.alfresco.com/t5/alfresco-content-services-blog/acs-containers-and-cgroup-v2-in-acs-up-to-7-2/ba-p/318039
version: "2"
services:
alfresco:
Expand Down Expand Up @@ -56,13 +59,15 @@ services:
-Ddsync.service.uris=http://localhost:9090/alfresco
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1900m
transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:2.1.1
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=512m
ACTIVEMQ_URL: nio://activemq:61616
CORE_AIO_URL: http://transform-core-aio:8090
FILE_STORE_URL: >-
Expand All @@ -78,6 +83,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1536m
ACTIVEMQ_URL: nio://activemq:61616
FILE_STORE_URL: >-
http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file
Expand All @@ -92,6 +98,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=512m
scheduler.content.age.millis: 86400000
scheduler.cleanup.interval: 86400000
ports:
Expand All @@ -107,6 +114,7 @@ services:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1g
-Dalfresco.host=localhost
-Dalfresco.port=8080
-Dalfresco.context=alfresco
Expand Down Expand Up @@ -191,6 +199,7 @@ services:
-Ddw.server.applicationConnectors[0].type=http
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
-XX:MaxRAM=1g
ports:
- "9090:9090"
volumes:
Expand Down

0 comments on commit 3eeca37

Please sign in to comment.