diff --git a/readme-vars.yml b/readme-vars.yml index 7868e51..1876cf6 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -61,6 +61,8 @@ app_setup_block: | Formally only mongodb 3.6 through 4.4 are supported, however, it has been reported that newer versions will work. If you choose to use a newer version be aware that you will not be operating a supported configuration. + **Make sure you pin your database image version and do not use `latest`, as mongodb does not support automatic upgrades between major versions.** + If you are using the [official mongodb container](https://hub.docker.com/_/mongo/), you can create your databases using an `init-mongo.js` file with the following contents: ```js diff --git a/root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run b/root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run index 832b110..65e6ed4 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run @@ -25,10 +25,10 @@ if [[ ! -e /config/data/system.properties ]]; then exit 1 else sed -i "s/~MONGO_USER~/${MONGO_USER}/" /defaults/system.properties - sed -i "s/~MONGO_PASS~/${MONGO_PASS}/" /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 cp /defaults/system.properties /config/data fi fi