This repository was archived by the owner on Jan 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
root/etc/services.d/unifi Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ docker create \
5353 --name=unifi-controller \
5454 -e PUID=1000 \
5555 -e PGID=1000 \
56+ -e MEM_LIMIT=1024M `#optional` \
5657 -p 3478:3478/udp \
5758 -p 10001:10001/udp \
5859 -p 8080:8080 \
@@ -96,6 +97,7 @@ services:
9697 environment:
9798 - PUID=1000
9899 - PGID=1000
100+ - MEM_LIMIT=1024M #optional
99101 volumes:
100102 - <path to data>:/config
101103 ports:
@@ -126,6 +128,7 @@ Container images are configured using parameters passed at runtime (such as thos
126128| ` -p 6789 ` | For throughput test |
127129| ` -e PUID=1000 ` | for UserID - see below for explanation |
128130| ` -e PGID=1000 ` | for GroupID - see below for explanation |
131+ | ` -e MEM_LIMIT=1024M ` | Optionally change the Java memory limit (-Xmx) (default is 1024M). |
129132| ` -v /config ` | All Unifi data stored here |
130133
131134## User / Group Identifiers
@@ -225,5 +228,6 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
225228
226229## Versions
227230
231+ * ** 29.07.19:** - Allow for changing Java mem limit via new optional environment variable.
228232* ** 23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
229233* ** 10.02.19:** - Initial release of new unifi-controller image with new tags and pipeline logic
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ available_architectures:
1414 - { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
1515 - { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
1616
17+ # optional container parameters
18+ opt_param_usage_include_env : true
19+ opt_param_env_vars :
20+ - { env_var: "MEM_LIMIT", env_value: "1024M", desc: "Optionally change the Java memory limit (-Xmx) (default is 1024M)." }
21+
1722# Optional Block
1823optional_block_1 : true
1924optional_block_1_items :
@@ -70,5 +75,6 @@ app_setup_block: |
7075
7176# changelog
7277changelogs :
78+ - { date: "29.07.19:", desc: "Allow for changing Java mem limit via new optional environment variable." }
7379 - { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
7480 - { date: "10.02.19:", desc: "Initial release of new unifi-controller image with new tags and pipeline logic" }
Original file line number Diff line number Diff line change 22
33cd /config || exit
44
5+ if [ -z ${MEM_LIMIT+x} ]; then
6+ MEM_LIMIT="1024M"
7+ fi
8+
59exec \
6- s6-setuidgid abc java -Xmx1024M -jar /usr/lib/unifi/lib/ace.jar start
10+ s6-setuidgid abc java -Xmx"${MEM_LIMIT}" -jar /usr/lib/unifi/lib/ace.jar start
You can’t perform that action at this time.
0 commit comments