chore: Update embedded MongoDB Schema version (#27985)
This commit is contained in:
parent
8fd8e32cd2
commit
afd03a526d
|
|
@ -92,7 +92,7 @@ ENV PATH /opt/appsmith/utils/node_modules/.bin:/opt/java/bin:/opt/node/bin:$PATH
|
||||||
|
|
||||||
RUN cd ./utils && npm install --only=prod && npm install --only=prod -g . && cd - \
|
RUN cd ./utils && npm install --only=prod && npm install --only=prod -g . && cd - \
|
||||||
&& chmod 0644 /etc/cron.d/* \
|
&& chmod 0644 /etc/cron.d/* \
|
||||||
&& chmod +x entrypoint.sh renew-certificate.sh healthcheck.sh templates/nginx-app.conf.sh /watchtower-hooks/*.sh \
|
&& chmod +x *.sh templates/nginx-app.conf.sh /watchtower-hooks/*.sh \
|
||||||
# Disable setuid/setgid bits for the files inside container.
|
# Disable setuid/setgid bits for the files inside container.
|
||||||
&& find / \( -path /proc -prune \) -o \( \( -perm -2000 -o -perm -4000 \) -print -exec chmod -s '{}' + \) || true \
|
&& find / \( -path /proc -prune \) -o \( \( -perm -2000 -o -perm -4000 \) -print -exec chmod -s '{}' + \) || true \
|
||||||
&& node prepare-image.mjs
|
&& node prepare-image.mjs
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,8 @@ init_mongodb() {
|
||||||
openssl rand -base64 756 > "$MONGO_DB_KEY"
|
openssl rand -base64 756 > "$MONGO_DB_KEY"
|
||||||
fi
|
fi
|
||||||
use-mongodb-key "$MONGO_DB_KEY"
|
use-mongodb-key "$MONGO_DB_KEY"
|
||||||
|
|
||||||
|
./mongodb-fixer.sh &
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
31
deploy/docker/fs/opt/appsmith/mongodb-fixer.sh
Normal file
31
deploy/docker/fs/opt/appsmith/mongodb-fixer.sh
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
while [[ ! -S "$TMP/supervisor.sock" ]]; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
echo "supervisor.sock found"
|
||||||
|
|
||||||
|
while supervisorctl status mongodb | grep -q RUNNING; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
echo "MongoDB is RUNNING"
|
||||||
|
|
||||||
|
for _ in {1..60}; do
|
||||||
|
if mongosh --quiet "$APPSMITH_MONGODB_URI" --eval '
|
||||||
|
parseFloat(db.adminCommand({getParameter: 1, featureCompatibilityVersion: 1}).featureCompatibilityVersion.version) < 5 &&
|
||||||
|
db.adminCommand({setFeatureCompatibilityVersion: "5.0"})
|
||||||
|
'; then
|
||||||
|
echo "MongoDB version set to 5.0"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
echo Done
|
||||||
|
|
||||||
|
} | sed -u 's/^/mongodb-fixer: /'
|
||||||
Loading…
Reference in New Issue
Block a user