Skip to content

Commit fe3ded9

Browse files
authored
Merge pull request #2 from linuxserver/init-order
Sed password last to avoid issues with special characters
2 parents 42b093a + e4cdf59 commit fe3ded9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

readme-vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ app_setup_block: |
6161
6262
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.
6363
64+
**Make sure you pin your database image version and do not use `latest`, as mongodb does not support automatic upgrades between major versions.**
65+
6466
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:
6567
6668
```js

root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ if [[ ! -e /config/data/system.properties ]]; then
2525
exit 1
2626
else
2727
sed -i "s/~MONGO_USER~/${MONGO_USER}/" /defaults/system.properties
28-
sed -i "s/~MONGO_PASS~/${MONGO_PASS}/" /defaults/system.properties
2928
sed -i "s/~MONGO_HOST~/${MONGO_HOST}/" /defaults/system.properties
3029
sed -i "s/~MONGO_PORT~/${MONGO_PORT}/" /defaults/system.properties
3130
sed -i "s/~MONGO_DBNAME~/${MONGO_DBNAME}/" /defaults/system.properties
31+
sed -i "s/~MONGO_PASS~/${MONGO_PASS}/" /defaults/system.properties
3232
cp /defaults/system.properties /config/data
3333
fi
3434
fi

0 commit comments

Comments
 (0)