mirror of
https://github.com/linuxserver/docker-unifi-network-application.git
synced 2025-03-05 20:59:58 -08:00
Compare commits
17 commits
d1df8ccf4f
...
2f85256c55
Author | SHA1 | Date | |
---|---|---|---|
|
2f85256c55 | ||
|
f5ae523248 | ||
|
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 \
|
||||||
|
|
|
@ -201,10 +201,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` \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
NAME VERSION TYPE
|
NAME VERSION TYPE
|
||||||
ace java-archive
|
ace UNKNOWN java-archive
|
||||||
adduser 3.137ubuntu1 deb
|
adduser 3.137ubuntu1 deb
|
||||||
analytics-api 2.0.0 java-archive
|
analytics-api 2.0.0 java-archive
|
||||||
analytics-client 2.0.0 java-archive
|
analytics-client 2.0.0 java-archive
|
||||||
|
@ -27,8 +27,8 @@ bsdutils 1:2.39.3-9ubuntu6.1 deb
|
||||||
bson 4.11.2 java-archive
|
bson 4.11.2 java-archive
|
||||||
bson-record-codec 4.11.2 java-archive
|
bson-record-codec 4.11.2 java-archive
|
||||||
ca-certificates 20240203 deb
|
ca-certificates 20240203 deb
|
||||||
ca-certificates-java java-archive
|
|
||||||
ca-certificates-java 20240118 deb
|
ca-certificates-java 20240118 deb
|
||||||
|
ca-certificates-java UNKNOWN java-archive
|
||||||
catatonit 0.1.7-1 deb
|
catatonit 0.1.7-1 deb
|
||||||
checker-qual 3.42.0 java-archive
|
checker-qual 3.42.0 java-archive
|
||||||
classmate 1.6.0 java-archive
|
classmate 1.6.0 java-archive
|
||||||
|
@ -48,7 +48,7 @@ coreutils 9.4-3ubuntu6 deb
|
||||||
cron 3.0pl1-184ubuntu2 deb
|
cron 3.0pl1-184ubuntu2 deb
|
||||||
cron-daemon-common 3.0pl1-184ubuntu2 deb
|
cron-daemon-common 3.0pl1-184ubuntu2 deb
|
||||||
cron4j 2.2.5 java-archive
|
cron4j 2.2.5 java-archive
|
||||||
curl 8.5.0-2ubuntu10.3 deb
|
curl 8.5.0-2ubuntu10.4 deb
|
||||||
dash 0.5.12-6ubuntu5 deb
|
dash 0.5.12-6ubuntu5 deb
|
||||||
debconf 1.5.86ubuntu1 deb
|
debconf 1.5.86ubuntu1 deb
|
||||||
debianutils 5.17build1 deb
|
debianutils 5.17build1 deb
|
||||||
|
@ -169,7 +169,7 @@ libcap2 1:2.66-5ubuntu2 deb
|
||||||
libcom-err2 1.47.0-2.4~exp1ubuntu4.1 deb
|
libcom-err2 1.47.0-2.4~exp1ubuntu4.1 deb
|
||||||
libcommons-daemon-java 1.0.15-11build1 deb
|
libcommons-daemon-java 1.0.15-11build1 deb
|
||||||
libcrypt1 1:4.4.36-4build1 deb
|
libcrypt1 1:4.4.36-4build1 deb
|
||||||
libcurl4t64 8.5.0-2ubuntu10.3 deb
|
libcurl4t64 8.5.0-2ubuntu10.4 deb
|
||||||
libdb5.3t64 5.3.28+dfsg2-7 deb
|
libdb5.3t64 5.3.28+dfsg2-7 deb
|
||||||
libdebconfclient0 0.271ubuntu3 deb
|
libdebconfclient0 0.271ubuntu3 deb
|
||||||
libext2fs2t64 1.47.0-2.4~exp1ubuntu4.1 deb
|
libext2fs2t64 1.47.0-2.4~exp1ubuntu4.1 deb
|
||||||
|
|
|
@ -144,6 +144,7 @@ app_setup_block: |
|
||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- { date: "17.08.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