Compare commits
15
Commits
fix_update
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d82a822bab | ||
|
|
dfd19ec9f4 | ||
|
|
82f9ec8f60 | ||
|
|
cf8a8e3795 | ||
|
|
60ba2892be | ||
|
|
243285ae7f | ||
|
|
4f40a047dc | ||
|
|
31b5c61ee5 | ||
|
|
d014ca6cb9 | ||
|
|
4232801ccb | ||
|
|
a73755cb11
|
||
|
|
a28194b4a8 | ||
|
|
2fd4563bf7
|
||
|
|
cc61647a90 | ||
|
|
073ff878c7
|
@@ -1,7 +1,7 @@
|
|||||||
export ENTRYPOINT_VERSION=v4
|
export ENTRYPOINT_VERSION=v4
|
||||||
|
|
||||||
set_settings(){
|
set_settings() {
|
||||||
mongosh wekan --eval '
|
mongosh wekan --eval '
|
||||||
db.settings.updateOne(
|
db.settings.updateOne(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
@@ -16,10 +16,34 @@ set_settings(){
|
|||||||
)'
|
)'
|
||||||
}
|
}
|
||||||
|
|
||||||
show_mongo_version (){
|
show_mongo_version() {
|
||||||
mongosh --eval 'db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )'
|
mongosh --eval 'db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )'
|
||||||
}
|
}
|
||||||
|
|
||||||
update_mongo_version (){
|
update_mongo_version() {
|
||||||
mongosh --eval 'db.adminCommand( { setFeatureCompatibilityVersion: "5.0" } )'
|
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());
|
||||||
|
}
|
||||||
|
'
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -36,7 +36,7 @@ services:
|
|||||||
backupbot.restore.post-hook: "mongorestore --drop --archive=/data/db/wekan.db"
|
backupbot.restore.post-hook: "mongorestore --drop --archive=/data/db/wekan.db"
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: quay.io/wekan/wekan:v12.08
|
image: quay.io/wekan/wekan:v12.74
|
||||||
environment:
|
environment:
|
||||||
- METEOR_REACTIVITY_ORDER=changeStreams,oplog,polling
|
- METEOR_REACTIVITY_ORDER=changeStreams,oplog,polling
|
||||||
- MONGO_URL=mongodb://db:27017/wekan?replicaSet=rs0
|
- 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}.rule=Host(`${DOMAIN}`)"
|
||||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=4.0.1+v10.79"
|
- "coop-cloud.${STACK_NAME}.version=5.3.0+v12.74"
|
||||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT}"
|
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT}"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Important: Run normalize_replset_config and update_mongo_version before and update_mongo_version after the update
|
||||||
Reference in New Issue
Block a user