Compare commits

...

21 commits

Author SHA1 Message Date
Roman ef398ad348
Merge 65fc4de5d4 into f059961c17 2025-01-06 11:07:54 -05:00
LinuxServer-CI f059961c17
Bot Updating Package Versions 2025-01-06 09:57:59 +00:00
sturman 65fc4de5d4 Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties
# Conflicts:
#	readme-vars.yml
2024-12-23 12:10:17 +02:00
sturman 0aa4543e91 Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties 2024-11-10 12:21:29 +02:00
sturman 3c43dd6cd8 Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties 2024-10-10 12:33:26 +03:00
Roman 7654109ffa
Merge branch 'linuxserver:main' into replace-placeholers-in-proeprties 2024-09-27 09:42:48 +03:00
sturman a60a8bd34f Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties 2024-08-27 09:24:48 +03:00
sturman 61c4b501a0 Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties
# Conflicts:
#	README.md
#	readme-vars.yml
2024-08-17 10:39:00 +03:00
sturman 76bcaf322d Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties 2024-07-17 22:15:18 +03:00
sturman 4ea124f871 Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties 2024-06-04 15:27:21 +03:00
sturman 96d3003d43 Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties
# Conflicts:
#	readme-vars.yml
2024-05-21 16:10:51 +03:00
sturman 9f8030f07a Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties 2024-04-29 15:19:50 +03:00
sturman 1a538030be Add new environment variables to README.md 2024-03-20 12:27:16 +02:00
sturman 41b367182a Merge remote-tracking branch 'origin/main' into replace-placeholers-in-proeprties 2024-03-20 12:20:41 +02:00
sturman 27594b95a8 Sort dependencies 2024-02-24 21:51:16 +02:00
sturman 36abd4e762 Revert "Install envsubst alternative (Go version)"
This reverts commit 62dab7b4
2024-02-24 21:50:33 +02:00
sturman 3be04fb262 Fix log message 2024-02-24 20:55:31 +02:00
sturman a1b59c28ec Set DEBIAN_FRONTEND environment variable 2024-02-24 20:38:41 +02:00
sturman 62dab7b4c2 Install envsubst alternative (Go version) 2024-02-24 20:35:15 +02:00
sturman 1146ec48fd Install envsubst 2024-02-24 20:20:02 +02:00
sturman fb1bd160e3 Use envsubst to replace placeholders in system.properties 2024-02-24 20:19:53 +02:00
7 changed files with 51 additions and 77 deletions

View file

@ -17,6 +17,7 @@ RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
gettext \
jsvc \
logrotate \
openjdk-17-jre-headless \

View file

@ -17,6 +17,7 @@ RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
gettext \
jsvc \
logrotate \
openjdk-17-jre-headless \

View file

@ -204,10 +204,8 @@ docker run -d \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e MONGO_USER=unifi \
-e MONGO_PASS= \
-e MONGO_HOST=unifi-db \
-e MONGO_PORT=27017 \
-e MONGO_URI=mongodb+srv://unifi:password@unifi.mongodb.net/?retryWrites=true&w=majority&appName=unifi \
-e STAT_MONGO_URI=mongodb+srv://unifi:password@unifi.mongodb.net/?retryWrites=true&w=majority&appName=unifi \
-e MONGO_DBNAME=unifi \
-e MONGO_AUTHSOURCE=admin \
-e MEM_LIMIT=1024 `#optional` \

View file

@ -24,8 +24,8 @@ bcpkix-jdk18on 1.75 jav
bcprov-jdk18on 1.75 java-archive
bcutil-jdk18on 1.75 java-archive
bsdutils 1:2.39.3-9ubuntu6.1 deb
bson 4.11.2 java-archive
bson-record-codec 4.11.2 java-archive
bson 4.11.5 java-archive
bson-record-codec 4.11.5 java-archive
ca-certificates 20240203 deb
ca-certificates-java 20240118 deb
ca-certificates-java UNKNOWN java-archive
@ -99,8 +99,8 @@ hostname 3.23+nmu2ubuntu2 deb
httpclient 4.5.5 java-archive
httpclient5 5.2.3 java-archive
httpcore 4.4.16 java-archive
httpcore5 5.2.4 java-archive
httpcore5-h2 5.2.4 java-archive
httpcore5 5.2.5 java-archive
httpcore5-h2 5.2.5 java-archive
imap 2.0.3 java-archive
init-system-helpers 1.66ubuntu1 deb
istack-commons-runtime 4.1.2 java-archive
@ -132,7 +132,7 @@ jaxb-runtime 4.0.5 jav
jaxen 2.0.0 java-archive
jbcrypt 0.4 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
jgrapht-core 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
jstun 0.7.4 java-archive
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
krb5-locales 1.20.1-6ubuntu2.2 deb
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
logrotate 3.21.0-2build1 deb
logsave 1.47.0-2.4~exp1ubuntu4.1 deb
mapstruct 1.6.2 java-archive
mawk 1.3.4.20240123-1build1 deb
micrometer-commons 1.12.7 java-archive
micrometer-observation 1.12.7 java-archive
micrometer-commons 1.12.13 java-archive
micrometer-observation 1.12.13 java-archive
minimal-json 0.9.5 java-archive
mongodb-driver-core 4.11.2 java-archive
mongodb-driver-sync 4.11.2 java-archive
mongodb-driver-core 4.11.5 java-archive
mongodb-driver-sync 4.11.5 java-archive
mount 2.39.3-9ubuntu6.1 deb
ncurses-base 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
radclient4 4.0 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
relaxngDatatype 20020414 java-archive
resource-loader 2.0.2 java-archive
sed 4.9-2build1 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
snakeyaml 2.2 java-archive
snappy-java 1.1.10.5 java-archive
spring-aop 6.1.10 java-archive
spring-beans 6.1.10 java-archive
spring-boot 3.2.7 java-archive
spring-boot-autoconfigure 3.2.7 java-archive
spring-boot-starter 3.2.7 java-archive
spring-boot-starter-data-mongodb 3.2.7 java-archive
spring-boot-starter-json 3.2.7 java-archive
spring-boot-starter-logging 3.2.7 java-archive
spring-boot-starter-tomcat 3.2.7 java-archive
spring-boot-starter-validation 3.2.7 java-archive
spring-boot-starter-web 3.2.7 java-archive
spring-boot-starter-websocket 3.2.7 java-archive
spring-context 6.1.10 java-archive
spring-core 6.1.10 java-archive
spring-data-commons 3.2.7 java-archive
spring-data-mongodb 4.2.7 java-archive
spring-expression 6.1.10 java-archive
spring-messaging 6.1.10 java-archive
spring-tx 6.1.10 java-archive
spring-web 6.1.10 java-archive
spring-webmvc 6.1.10 java-archive
spring-websocket 6.1.10 java-archive
spring-aop 6.1.15 java-archive
spring-beans 6.1.15 java-archive
spring-boot 3.2.12 java-archive
spring-boot-autoconfigure 3.2.12 java-archive
spring-boot-starter 3.2.12 java-archive
spring-boot-starter-data-mongodb 3.2.12 java-archive
spring-boot-starter-json 3.2.12 java-archive
spring-boot-starter-logging 3.2.12 java-archive
spring-boot-starter-tomcat 3.2.12 java-archive
spring-boot-starter-validation 3.2.12 java-archive
spring-boot-starter-web 3.2.12 java-archive
spring-boot-starter-websocket 3.2.12 java-archive
spring-context 6.1.15 java-archive
spring-core 6.1.15 java-archive
spring-data-commons 3.2.12 java-archive
spring-data-mongodb 4.2.12 java-archive
spring-expression 6.1.15 java-archive
spring-messaging 6.1.15 java-archive
spring-tx 6.1.15 java-archive
spring-web 6.1.15 java-archive
spring-webmvc 6.1.15 java-archive
spring-websocket 6.1.15 java-archive
sshj 0.38.0 java-archive
stax-api 1.0-2 java-archive
systemd-standalone-sysusers 255.4-1ubuntu8.4 deb
sysvinit-utils 3.08-6ubuntu3 deb
tar 1.35+dfsg-3build1 deb
tomcat-annotations-api 10.1.25 java-archive
tomcat-embed-core 10.1.25 java-archive
tomcat-embed-el 10.1.25 java-archive
tomcat-embed-jasper 10.1.25 java-archive
tomcat-embed-websocket 10.1.25 java-archive
tomcat-annotations-api 10.1.33 java-archive
tomcat-embed-core 10.1.33 java-archive
tomcat-embed-el 10.1.33 java-archive
tomcat-embed-jasper 10.1.33 java-archive
tomcat-embed-websocket 10.1.33 java-archive
txw2 4.0.5 java-archive
tzdata 2024a-3ubuntu1.1 deb
ubuntu-keyring 2023.11.28.1 deb

View file

@ -175,6 +175,7 @@ init_diagram: |
"unifi-network-application:latest" <- Base Images
# changelog
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: "Rebase to Ubuntu Noble."}
- {date: "04.03.24:", desc: "Install from zip package instead of deb."}

View file

@ -41,6 +41,6 @@
# unifi.throughput.port=6789
#
db.mongo.local=false
db.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~?tls=~MONGO_TLS~~MONGO_AUTHSOURCE~
statdb.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~_stat?tls=~MONGO_TLS~~MONGO_AUTHSOURCE~
unifi.db.name=~MONGO_DBNAME~
db.mongo.uri=$MONGO_URI
statdb.mongo.uri=$STAT_MONGO_URI
unifi.db.name=$MONGO_DBNAME

View file

@ -28,39 +28,11 @@ if [[ ! -L "/usr/lib/unifi/run" ]]; then
fi
if [[ ! -e /config/data/system.properties ]]; then
if [[ -z "${MONGO_HOST}" ]]; then
echo "*** No MONGO_HOST set, cannot configure database settings. ***"
if [[ -z "${MONGO_URI}" || -z "${STAT_MONGO_URI}" || -z "${MONGO_DBNAME}" ]]; then
echo "*** Required environment variables are not set, cannot configure database settings. ***"
sleep infinity
else
echo "*** Waiting for MONGO_HOST ${MONGO_HOST} to be reachable. ***"
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
envsubst < /defaults/system.properties > /config/data/system.properties
fi
fi