Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0155cd47e0
|
||
|
|
9926c5a406
|
@@ -1,7 +1,7 @@
|
||||
export ENTRYPOINT_VERSION=v4
|
||||
|
||||
set_settings() {
|
||||
mongosh wekan --eval '
|
||||
set_settings(){
|
||||
mongosh wekan --eval '
|
||||
db.settings.updateOne(
|
||||
{},
|
||||
{
|
||||
@@ -16,34 +16,10 @@ set_settings() {
|
||||
)'
|
||||
}
|
||||
|
||||
show_mongo_version() {
|
||||
mongosh --eval 'db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )'
|
||||
show_mongo_version (){
|
||||
mongosh --eval 'db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )'
|
||||
}
|
||||
|
||||
update_mongo_version() {
|
||||
mongosh --quiet --eval '
|
||||
const target = db.version().split(".").slice(0, 2).join(".");
|
||||
const command = {setFeatureCompatibilityVersion: target};
|
||||
if (parseInt(target, 10) >= 7) command.confirm = true;
|
||||
print("set featureCompatibilityVersion to " + target);
|
||||
printjson(db.adminCommand(command));
|
||||
'
|
||||
}
|
||||
|
||||
normalize_replset_config() {
|
||||
mongosh --quiet --eval '
|
||||
const local = db.getSiblingDB("local");
|
||||
const stored = local.system.replset.findOne();
|
||||
if (!stored) { print("no stored replica set configuration"); quit(0); }
|
||||
if (db.serverStatus().repl) { // already a set: only a reconfig may write
|
||||
const cfg = rs.conf();
|
||||
cfg.version = cfg.version + 1;
|
||||
printjson(rs.reconfig(cfg));
|
||||
} else { // standalone: nobody is using it yet
|
||||
stored.members.forEach(m => { delete m.slaveDelay; m.secondaryDelaySecs = 0; m.host = "db:27017"; });
|
||||
stored.version = stored.version + 1;
|
||||
local.system.replset.replaceOne({_id: stored._id}, stored);
|
||||
printjson(local.system.replset.findOne());
|
||||
}
|
||||
'
|
||||
update_mongo_version (){
|
||||
mongosh --eval 'db.adminCommand( { setFeatureCompatibilityVersion: "5.0" } )'
|
||||
}
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@ services:
|
||||
backupbot.restore.post-hook: "mongorestore --drop --archive=/data/db/wekan.db"
|
||||
|
||||
app:
|
||||
image: quay.io/wekan/wekan:v12.65
|
||||
image: quay.io/wekan/wekan:v12.08
|
||||
environment:
|
||||
- METEOR_REACTIVITY_ORDER=changeStreams,oplog,polling
|
||||
- MONGO_URL=mongodb://db:27017/wekan?replicaSet=rs0
|
||||
@@ -104,7 +104,7 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "coop-cloud.${STACK_NAME}.version=5.2.0+v12.65"
|
||||
- "coop-cloud.${STACK_NAME}.version=4.0.1+v10.79"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT}"
|
||||
|
||||
volumes:
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Important: Run normalize_replset_config and update_mongo_version before and update_mongo_version after the update
|
||||
Reference in New Issue
Block a user