Compare commits

...
2 Commits
Author SHA1 Message Date
moritz 0155cd47e0 chore: update image tags 2026-09-28 19:00:59 +02:00
moritz 9926c5a406 fix replica set 2026-09-28 18:59:27 +02:00
+21 -15
View File
@@ -1,27 +1,33 @@
version: "3.8" version: "3.8"
services: services:
db: db:
image: mongo:8.3 image: mongo:7.0
hostname: db
environment: environment:
- LOGO_IMG_URL - LOGO_IMG_URL
- LOGO_LINK_URL - LOGO_LINK_URL
command: > command:
sh -c " - bash
mongod --oplogSize 128 --replSet rs0 --quiet --bind_ip_all & - -c
until mongosh --eval 'rs.initiate()' > /dev/null 2>&1; do - |
sleep 2 (
done; until mongosh --quiet --eval 'try { rs.status().ok } catch (e) { rs.initiate({_id: "rs0", members: [{_id: 0, host: "db:27017"}]}).ok }' 2>/dev/null | grep -q 1; do
wait" sleep 2
done
echo "[init] replica set rs0 ready"
) &
exec mongod --replSet rs0 --bind_ip_all --oplogSize 128 --quiet
volumes: volumes:
- wekan-db:/data/db - wekan-db:/data/db
networks: networks:
- internal - internal
healthcheck: healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet test: ["CMD", "mongosh", "--host", "127.0.0.1", "--port", "27017", "--quiet", "--eval", "try { quit(rs.status().ok === 1 && db.hello().isWritablePrimary ? 0 : 1) } catch (e) { quit(1) }"]
interval: 30s interval: 10s
timeout: 10s timeout: 10s
retries: 10 retries: 30
start_period: 1m start_period: 5m
stop_grace_period: 1m
deploy: deploy:
labels: labels:
backupbot.backup: "${ENABLE_BACKUPS:-true}" backupbot.backup: "${ENABLE_BACKUPS:-true}"
@@ -30,10 +36,10 @@ 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:v10.79 image: quay.io/wekan/wekan:v12.08
environment: environment:
- METEOR_REACTIVITY_ORDER=changeStreams,oplog,polling - METEOR_REACTIVITY_ORDER=changeStreams,oplog,polling
- MONGO_URL=mongodb://db:27017/wekan - MONGO_URL=mongodb://db:27017/wekan?replicaSet=rs0
- MONGO_OPLOG_URL=mongodb://db:27017/local?replicaSet=rs0 - MONGO_OPLOG_URL=mongodb://db:27017/local?replicaSet=rs0
- NODE_OPTIONS="--max_old_space_size=4096" - NODE_OPTIONS="--max_old_space_size=4096"
- DOMAIN - DOMAIN
@@ -76,7 +82,7 @@ services:
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 10 retries: 10
start_period: 3m start_period: 5m
secrets: secrets:
- oauth2_secret - oauth2_secret
configs: configs: