mirror of
https://github.com/linuxserver/docker-unifi-network-application.git
synced 2025-03-05 20:59:58 -08:00
Compare commits
21 commits
697d1d33b5
...
ef398ad348
Author | SHA1 | Date | |
---|---|---|---|
|
ef398ad348 | ||
|
f059961c17 | ||
|
65fc4de5d4 | ||
|
0aa4543e91 | ||
|
3c43dd6cd8 | ||
|
7654109ffa | ||
|
a60a8bd34f | ||
|
61c4b501a0 | ||
|
76bcaf322d | ||
|
4ea124f871 | ||
|
96d3003d43 | ||
|
9f8030f07a | ||
|
1a538030be | ||
|
41b367182a | ||
|
27594b95a8 | ||
|
36abd4e762 | ||
|
3be04fb262 | ||
|
a1b59c28ec | ||
|
62dab7b4c2 | ||
|
1146ec48fd | ||
|
fb1bd160e3 |
|
@ -17,6 +17,7 @@ RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install --no-install-recommends -y \
|
apt-get install --no-install-recommends -y \
|
||||||
|
gettext \
|
||||||
jsvc \
|
jsvc \
|
||||||
logrotate \
|
logrotate \
|
||||||
openjdk-17-jre-headless \
|
openjdk-17-jre-headless \
|
||||||
|
|
|
@ -17,6 +17,7 @@ RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install --no-install-recommends -y \
|
apt-get install --no-install-recommends -y \
|
||||||
|
gettext \
|
||||||
jsvc \
|
jsvc \
|
||||||
logrotate \
|
logrotate \
|
||||||
openjdk-17-jre-headless \
|
openjdk-17-jre-headless \
|
||||||
|
|
|
@ -204,10 +204,8 @@ docker run -d \
|
||||||
-e PUID=1000 \
|
-e PUID=1000 \
|
||||||
-e PGID=1000 \
|
-e PGID=1000 \
|
||||||
-e TZ=Etc/UTC \
|
-e TZ=Etc/UTC \
|
||||||
-e MONGO_USER=unifi \
|
-e MONGO_URI=mongodb+srv://unifi:password@unifi.mongodb.net/?retryWrites=true&w=majority&appName=unifi \
|
||||||
-e MONGO_PASS= \
|
-e STAT_MONGO_URI=mongodb+srv://unifi:password@unifi.mongodb.net/?retryWrites=true&w=majority&appName=unifi \
|
||||||
-e MONGO_HOST=unifi-db \
|
|
||||||
-e MONGO_PORT=27017 \
|
|
||||||
-e MONGO_DBNAME=unifi \
|
-e MONGO_DBNAME=unifi \
|
||||||
-e MONGO_AUTHSOURCE=admin \
|
-e MONGO_AUTHSOURCE=admin \
|
||||||
-e MEM_LIMIT=1024 `#optional` \
|
-e MEM_LIMIT=1024 `#optional` \
|
||||||
|
|
|
@ -24,8 +24,8 @@ bcpkix-jdk18on 1.75 jav
|
||||||
bcprov-jdk18on 1.75 java-archive
|
bcprov-jdk18on 1.75 java-archive
|
||||||
bcutil-jdk18on 1.75 java-archive
|
bcutil-jdk18on 1.75 java-archive
|
||||||
bsdutils 1:2.39.3-9ubuntu6.1 deb
|
bsdutils 1:2.39.3-9ubuntu6.1 deb
|
||||||
bson 4.11.2 java-archive
|
bson 4.11.5 java-archive
|
||||||
bson-record-codec 4.11.2 java-archive
|
bson-record-codec 4.11.5 java-archive
|
||||||
ca-certificates 20240203 deb
|
ca-certificates 20240203 deb
|
||||||
ca-certificates-java 20240118 deb
|
ca-certificates-java 20240118 deb
|
||||||
ca-certificates-java UNKNOWN java-archive
|
ca-certificates-java UNKNOWN java-archive
|
||||||
|
@ -99,8 +99,8 @@ hostname 3.23+nmu2ubuntu2 deb
|
||||||
httpclient 4.5.5 java-archive
|
httpclient 4.5.5 java-archive
|
||||||
httpclient5 5.2.3 java-archive
|
httpclient5 5.2.3 java-archive
|
||||||
httpcore 4.4.16 java-archive
|
httpcore 4.4.16 java-archive
|
||||||
httpcore5 5.2.4 java-archive
|
httpcore5 5.2.5 java-archive
|
||||||
httpcore5-h2 5.2.4 java-archive
|
httpcore5-h2 5.2.5 java-archive
|
||||||
imap 2.0.3 java-archive
|
imap 2.0.3 java-archive
|
||||||
init-system-helpers 1.66ubuntu1 deb
|
init-system-helpers 1.66ubuntu1 deb
|
||||||
istack-commons-runtime 4.1.2 java-archive
|
istack-commons-runtime 4.1.2 java-archive
|
||||||
|
@ -132,7 +132,7 @@ jaxb-runtime 4.0.5 jav
|
||||||
jaxen 2.0.0 java-archive
|
jaxen 2.0.0 java-archive
|
||||||
jbcrypt 0.4 java-archive
|
jbcrypt 0.4 java-archive
|
||||||
jboss-logging 3.5.3.Final java-archive
|
jboss-logging 3.5.3.Final java-archive
|
||||||
jcl-over-slf4j 2.0.13 java-archive
|
jcl-over-slf4j 2.0.16 java-archive
|
||||||
jenetics 4.2.0 java-archive
|
jenetics 4.2.0 java-archive
|
||||||
jgrapht-core 1.0.1 java-archive
|
jgrapht-core 1.0.1 java-archive
|
||||||
jgrapht-ext 1.0.1 java-archive
|
jgrapht-ext 1.0.1 java-archive
|
||||||
|
@ -148,7 +148,7 @@ jsr305 3.0.2 jav
|
||||||
jstl 1.2 java-archive
|
jstl 1.2 java-archive
|
||||||
jstun 0.7.4 java-archive
|
jstun 0.7.4 java-archive
|
||||||
jsvc 1.0.15-11build1 deb
|
jsvc 1.0.15-11build1 deb
|
||||||
jul-to-slf4j 2.0.13 java-archive
|
jul-to-slf4j 2.0.16 java-archive
|
||||||
keyboxd 2.4.4-2ubuntu17 deb
|
keyboxd 2.4.4-2ubuntu17 deb
|
||||||
krb5-locales 1.20.1-6ubuntu2.2 deb
|
krb5-locales 1.20.1-6ubuntu2.2 deb
|
||||||
lazysodium-java 5.1.4 java-archive
|
lazysodium-java 5.1.4 java-archive
|
||||||
|
@ -248,12 +248,13 @@ logging-mailhandler 2.0.3 jav
|
||||||
login 1:4.13+dfsg1-4ubuntu3.2 deb
|
login 1:4.13+dfsg1-4ubuntu3.2 deb
|
||||||
logrotate 3.21.0-2build1 deb
|
logrotate 3.21.0-2build1 deb
|
||||||
logsave 1.47.0-2.4~exp1ubuntu4.1 deb
|
logsave 1.47.0-2.4~exp1ubuntu4.1 deb
|
||||||
|
mapstruct 1.6.2 java-archive
|
||||||
mawk 1.3.4.20240123-1build1 deb
|
mawk 1.3.4.20240123-1build1 deb
|
||||||
micrometer-commons 1.12.7 java-archive
|
micrometer-commons 1.12.13 java-archive
|
||||||
micrometer-observation 1.12.7 java-archive
|
micrometer-observation 1.12.13 java-archive
|
||||||
minimal-json 0.9.5 java-archive
|
minimal-json 0.9.5 java-archive
|
||||||
mongodb-driver-core 4.11.2 java-archive
|
mongodb-driver-core 4.11.5 java-archive
|
||||||
mongodb-driver-sync 4.11.2 java-archive
|
mongodb-driver-sync 4.11.5 java-archive
|
||||||
mount 2.39.3-9ubuntu6.1 deb
|
mount 2.39.3-9ubuntu6.1 deb
|
||||||
ncurses-base 6.4+20240113-1ubuntu2 deb
|
ncurses-base 6.4+20240113-1ubuntu2 deb
|
||||||
ncurses-bin 6.4+20240113-1ubuntu2 deb
|
ncurses-bin 6.4+20240113-1ubuntu2 deb
|
||||||
|
@ -276,48 +277,48 @@ publicsuffix 20231001.0357-0.1 deb
|
||||||
pull-parser 2.1.10 java-archive
|
pull-parser 2.1.10 java-archive
|
||||||
radclient4 4.0 java-archive
|
radclient4 4.0 java-archive
|
||||||
reactive-streams 1.0.4 java-archive
|
reactive-streams 1.0.4 java-archive
|
||||||
reactor-core 3.6.7 java-archive
|
reactor-core 3.6.12 java-archive
|
||||||
readline-common 8.2-4build1 deb
|
readline-common 8.2-4build1 deb
|
||||||
relaxngDatatype 20020414 java-archive
|
relaxngDatatype 20020414 java-archive
|
||||||
resource-loader 2.0.2 java-archive
|
resource-loader 2.0.2 java-archive
|
||||||
sed 4.9-2build1 deb
|
sed 4.9-2build1 deb
|
||||||
sensible-utils 0.0.22 deb
|
sensible-utils 0.0.22 deb
|
||||||
slf4j-api 2.0.13 java-archive
|
slf4j-api 2.0.16 java-archive
|
||||||
smtp 2.0.3 java-archive
|
smtp 2.0.3 java-archive
|
||||||
snakeyaml 2.2 java-archive
|
snakeyaml 2.2 java-archive
|
||||||
snappy-java 1.1.10.5 java-archive
|
snappy-java 1.1.10.5 java-archive
|
||||||
spring-aop 6.1.10 java-archive
|
spring-aop 6.1.15 java-archive
|
||||||
spring-beans 6.1.10 java-archive
|
spring-beans 6.1.15 java-archive
|
||||||
spring-boot 3.2.7 java-archive
|
spring-boot 3.2.12 java-archive
|
||||||
spring-boot-autoconfigure 3.2.7 java-archive
|
spring-boot-autoconfigure 3.2.12 java-archive
|
||||||
spring-boot-starter 3.2.7 java-archive
|
spring-boot-starter 3.2.12 java-archive
|
||||||
spring-boot-starter-data-mongodb 3.2.7 java-archive
|
spring-boot-starter-data-mongodb 3.2.12 java-archive
|
||||||
spring-boot-starter-json 3.2.7 java-archive
|
spring-boot-starter-json 3.2.12 java-archive
|
||||||
spring-boot-starter-logging 3.2.7 java-archive
|
spring-boot-starter-logging 3.2.12 java-archive
|
||||||
spring-boot-starter-tomcat 3.2.7 java-archive
|
spring-boot-starter-tomcat 3.2.12 java-archive
|
||||||
spring-boot-starter-validation 3.2.7 java-archive
|
spring-boot-starter-validation 3.2.12 java-archive
|
||||||
spring-boot-starter-web 3.2.7 java-archive
|
spring-boot-starter-web 3.2.12 java-archive
|
||||||
spring-boot-starter-websocket 3.2.7 java-archive
|
spring-boot-starter-websocket 3.2.12 java-archive
|
||||||
spring-context 6.1.10 java-archive
|
spring-context 6.1.15 java-archive
|
||||||
spring-core 6.1.10 java-archive
|
spring-core 6.1.15 java-archive
|
||||||
spring-data-commons 3.2.7 java-archive
|
spring-data-commons 3.2.12 java-archive
|
||||||
spring-data-mongodb 4.2.7 java-archive
|
spring-data-mongodb 4.2.12 java-archive
|
||||||
spring-expression 6.1.10 java-archive
|
spring-expression 6.1.15 java-archive
|
||||||
spring-messaging 6.1.10 java-archive
|
spring-messaging 6.1.15 java-archive
|
||||||
spring-tx 6.1.10 java-archive
|
spring-tx 6.1.15 java-archive
|
||||||
spring-web 6.1.10 java-archive
|
spring-web 6.1.15 java-archive
|
||||||
spring-webmvc 6.1.10 java-archive
|
spring-webmvc 6.1.15 java-archive
|
||||||
spring-websocket 6.1.10 java-archive
|
spring-websocket 6.1.15 java-archive
|
||||||
sshj 0.38.0 java-archive
|
sshj 0.38.0 java-archive
|
||||||
stax-api 1.0-2 java-archive
|
stax-api 1.0-2 java-archive
|
||||||
systemd-standalone-sysusers 255.4-1ubuntu8.4 deb
|
systemd-standalone-sysusers 255.4-1ubuntu8.4 deb
|
||||||
sysvinit-utils 3.08-6ubuntu3 deb
|
sysvinit-utils 3.08-6ubuntu3 deb
|
||||||
tar 1.35+dfsg-3build1 deb
|
tar 1.35+dfsg-3build1 deb
|
||||||
tomcat-annotations-api 10.1.25 java-archive
|
tomcat-annotations-api 10.1.33 java-archive
|
||||||
tomcat-embed-core 10.1.25 java-archive
|
tomcat-embed-core 10.1.33 java-archive
|
||||||
tomcat-embed-el 10.1.25 java-archive
|
tomcat-embed-el 10.1.33 java-archive
|
||||||
tomcat-embed-jasper 10.1.25 java-archive
|
tomcat-embed-jasper 10.1.33 java-archive
|
||||||
tomcat-embed-websocket 10.1.25 java-archive
|
tomcat-embed-websocket 10.1.33 java-archive
|
||||||
txw2 4.0.5 java-archive
|
txw2 4.0.5 java-archive
|
||||||
tzdata 2024a-3ubuntu1.1 deb
|
tzdata 2024a-3ubuntu1.1 deb
|
||||||
ubuntu-keyring 2023.11.28.1 deb
|
ubuntu-keyring 2023.11.28.1 deb
|
||||||
|
|
|
@ -175,6 +175,7 @@ init_diagram: |
|
||||||
"unifi-network-application:latest" <- Base Images
|
"unifi-network-application:latest" <- Base Images
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- {date: "23.12.24:", desc: "Change environment variables" }
|
||||||
- {date: "11.08.24:", desc: "**Important**: The mongodb init instructions have been updated to enable auth ([RBAC](https://www.mongodb.com/docs/manual/core/authorization/#role-based-access-control)). We have been notified that if RBAC is not enabled, the official mongodb container allows remote access to the db contents over port 27017 without credentials. If you set up the mongodb container with the old instructions we provided, you should not map or expose port 27017. If you would like to enable auth, the easiest way is to create new instances of both unifi and mongodb with the new instructions and restore unifi from a backup."}
|
- {date: "11.08.24:", desc: "**Important**: The mongodb init instructions have been updated to enable auth ([RBAC](https://www.mongodb.com/docs/manual/core/authorization/#role-based-access-control)). We have been notified that if RBAC is not enabled, the official mongodb container allows remote access to the db contents over port 27017 without credentials. If you set up the mongodb container with the old instructions we provided, you should not map or expose port 27017. If you would like to enable auth, the easiest way is to create new instances of both unifi and mongodb with the new instructions and restore unifi from a backup."}
|
||||||
- {date: "11.08.24:", desc: "Rebase to Ubuntu Noble."}
|
- {date: "11.08.24:", desc: "Rebase to Ubuntu Noble."}
|
||||||
- {date: "04.03.24:", desc: "Install from zip package instead of deb."}
|
- {date: "04.03.24:", desc: "Install from zip package instead of deb."}
|
||||||
|
|
|
@ -41,6 +41,6 @@
|
||||||
# unifi.throughput.port=6789
|
# unifi.throughput.port=6789
|
||||||
#
|
#
|
||||||
db.mongo.local=false
|
db.mongo.local=false
|
||||||
db.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~?tls=~MONGO_TLS~~MONGO_AUTHSOURCE~
|
db.mongo.uri=$MONGO_URI
|
||||||
statdb.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~_stat?tls=~MONGO_TLS~~MONGO_AUTHSOURCE~
|
statdb.mongo.uri=$STAT_MONGO_URI
|
||||||
unifi.db.name=~MONGO_DBNAME~
|
unifi.db.name=$MONGO_DBNAME
|
||||||
|
|
|
@ -28,39 +28,11 @@ if [[ ! -L "/usr/lib/unifi/run" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -e /config/data/system.properties ]]; then
|
if [[ ! -e /config/data/system.properties ]]; then
|
||||||
if [[ -z "${MONGO_HOST}" ]]; then
|
if [[ -z "${MONGO_URI}" || -z "${STAT_MONGO_URI}" || -z "${MONGO_DBNAME}" ]]; then
|
||||||
echo "*** No MONGO_HOST set, cannot configure database settings. ***"
|
echo "*** Required environment variables are not set, cannot configure database settings. ***"
|
||||||
sleep infinity
|
sleep infinity
|
||||||
else
|
else
|
||||||
echo "*** Waiting for MONGO_HOST ${MONGO_HOST} to be reachable. ***"
|
envsubst < /defaults/system.properties > /config/data/system.properties
|
||||||
DBCOUNT=0
|
|
||||||
while true; do
|
|
||||||
if nc -w1 "${MONGO_HOST}" "${MONGO_PORT}" >/dev/null 2>&1; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
DBCOUNT=$((DBCOUNT+1))
|
|
||||||
if [[ ${DBCOUNT} -gt 6 ]]; then
|
|
||||||
echo "*** Defined MONGO_HOST ${MONGO_HOST} is not reachable, cannot proceed. ***"
|
|
||||||
sleep infinity
|
|
||||||
fi
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
sed -i "s/~MONGO_USER~/${MONGO_USER}/" /defaults/system.properties
|
|
||||||
sed -i "s/~MONGO_HOST~/${MONGO_HOST}/" /defaults/system.properties
|
|
||||||
sed -i "s/~MONGO_PORT~/${MONGO_PORT}/" /defaults/system.properties
|
|
||||||
sed -i "s/~MONGO_DBNAME~/${MONGO_DBNAME}/" /defaults/system.properties
|
|
||||||
sed -i "s/~MONGO_PASS~/${MONGO_PASS}/" /defaults/system.properties
|
|
||||||
if [[ "${MONGO_TLS,,}" = "true" ]]; then
|
|
||||||
sed -i "s/~MONGO_TLS~/true/" /defaults/system.properties
|
|
||||||
else
|
|
||||||
sed -i "s/~MONGO_TLS~/false/" /defaults/system.properties
|
|
||||||
fi
|
|
||||||
if [[ -z "${MONGO_AUTHSOURCE}" ]]; then
|
|
||||||
sed -i "s/~MONGO_AUTHSOURCE~//" /defaults/system.properties
|
|
||||||
else
|
|
||||||
sed -i "s/~MONGO_AUTHSOURCE~/\&authSource=${MONGO_AUTHSOURCE}/" /defaults/system.properties
|
|
||||||
fi
|
|
||||||
cp /defaults/system.properties /config/data
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue