Skip to content
This repository was archived by the owner on Jan 7, 2024. It is now read-only.

Commit 03e385c

Browse files
authored
Merge pull request #74 from neredera/AddMemStartup
2 parents a5359c3 + 9f5dd84 commit 03e385c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

readme-vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ available_architectures:
1818
opt_param_usage_include_env: true
1919
opt_param_env_vars:
2020
- { env_var: "MEM_LIMIT", env_value: "1024M", desc: "Optionally change the Java memory limit (-Xmx) (default is 1024M)." }
21+
- { env_var: "MEM_STARTUP", env_value: "1024M", desc: "Optionally change the Java initial memory (-Xms) (default is 1024M)." }
2122

2223
# Optional Block
2324
optional_block_1: true
@@ -78,6 +79,7 @@ app_setup_block: |
7879
7980
# changelog
8081
changelogs:
82+
- { date: "11.06.21:", desc: "Allow for changing Java initial mem via new optional environment variable."}
8183
- { date: "12.01.21:", desc: "Deprecate the `LTS` tag as Unifi no longer releases LTS stable builds. Existing users can switch to the `latest` tag. Direct upgrade from 5.6.42 (LTS) to 6.0.42 (latest) tested successfully."}
8284
- { date: "17.07.20:", desc: "Rebase 64 bit containers to Bionic and Mongo 3.6."}
8385
- { date: "16.06.20:", desc: "Add logrotate."}

root/etc/services.d/unifi/run

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ if [ -z ${MEM_LIMIT+x} ]; then
66
MEM_LIMIT="1024M"
77
fi
88

9+
if [ -z ${MEM_STARTUP+x} ]; then
10+
MEM_STARTUP="1024M"
11+
fi
12+
913
exec \
10-
s6-setuidgid abc java -Xmx"${MEM_LIMIT}" -jar /usr/lib/unifi/lib/ace.jar start
14+
s6-setuidgid abc java -Xms"${MEM_STARTUP}" -Xmx"${MEM_LIMIT}" -jar /usr/lib/unifi/lib/ace.jar start

0 commit comments

Comments
 (0)