Compare commits

..

7 Commits

7 changed files with 27 additions and 38 deletions

View File

@ -4,8 +4,11 @@ SECRET_OAUTH2_SECRET_VERSION=v1
COMPOSE_FILE="compose.yml"
DOMAIN=board.example.org
ROOT_URL=https://board.example.org
# Set this to run mongodb in replicaset mode (needs initialisation!)
# COMPOSE_FILE="${COMPOSE_FILE}:compose.rs.yml"
DOMAIN=board.${DOMAIN}
ROOT_URL=https://board.${DOMAIN}
DEBUG=false
@ -36,6 +39,7 @@ OAUTH2_ENABLED=false
# OAUTH2_FULLNAME_MAP=given_name
# OAUTH2_EMAIL_MAP=email
# PROPAGATE_OIDC_DATA=true
# OIDC_REDIRECTION_ENABLED=true
### LDAP ###

View File

@ -35,4 +35,7 @@ needed to enable oplog setting in wekan, which isneeded to run bigger instances?
after mongo conaintainer came up the first time run:
abra app command wekan.example.org db init_db
```
abra app run wekan.example.org db mongo
> rs.initiate()
```

View File

@ -1,3 +1,2 @@
export SECRET_OAUTH2_SECRET_VERSION=v1
export ENTRYPOINT_VERSION=v2
export INIT_REPLICA_VERSION=v2

BIN
backup.db

Binary file not shown.

10
compose.rs.yml Normal file
View File

@ -0,0 +1,10 @@
version: "3.8"
services:
db:
command: mongod --oplogSize 128 --replSet rs0
app:
environment:
- MONGO_URL=mongodb://db:27017/wekan?replicaSet=rs01
- MONGO_OPLOG_URL=mongodb://db:27017/local?replicaSet=rsWekan=value

View File

@ -1,16 +1,12 @@
version: '3.8'
services:
db:
image: mongo:4.4
command: mongod --bind_ip_all --oplogSize 128 --replSet rs0
image: mongo:5.0
command: mongod --logpath /dev/null --oplogSize 128 --quiet
volumes:
- wekan-db:/data/db
networks:
- internal
configs:
- source: init-replica
target: /docker-entrypoint-initdb.d/init-replica.sh
mode: 0555
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
interval: 30s
@ -25,10 +21,9 @@ services:
backupbot.backup.path: "/tmp/backup/"
app:
image: quay.io/wekan/wekan:v6.28
image: quay.io/wekan/wekan:v6.78
environment:
- MONGO_URL=mongodb://db:27017/wekan?replicaSet=rs0
- MONGO_OPLOG_URL=mongodb://db:27017/local?replicaSet=rs0
- MONGO_URL=mongodb://db:27017/wekan
- DOMAIN
- ROOT_URL
- DEBUG
@ -55,6 +50,7 @@ services:
- OAUTH2_EMAIL_MAP
- DEFAULT_AUTHENTICATION_METHOD
- PROPAGATE_OIDC_DATA
- OIDC_REDIRECTION_ENABLED
networks:
- internal
- proxy
@ -87,7 +83,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=0.6.0+v6.28"
- "coop-cloud.${STACK_NAME}.version=0.13.0+v6.78"
volumes:
wekan-db:
@ -104,9 +100,7 @@ configs:
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
init-replica:
name: ${STACK_NAME}_init-replica_${INIT_REPLICA_VERSION}
file: init-replica.sh
template_driver: golang
secrets:
oauth2_secret:

View File

@ -1,21 +0,0 @@
#!/bin/sh
set -e
#host=${HOSTNAME:-$(hostname -f)}
# shut down again
#mongod --pidfilepath /tmp/docker-entrypoint-temp-mongod.pid --shutdown
# # restart again binding to 0.0.0.0 to allow a replset with 10.7.7.6
# mongod --oplogSize 8 --replSet rs0 --noauth \
# --config /tmp/docker-entrypoint-temp-config.json \
# --bind_ip 0.0.0.0 --port 27017 \
# --tlsMode disabled \
# --logpath /proc/1/fd/1 --logappend \
# --pidfilepath /tmp/docker-entrypoint-temp-mongod.pid --fork
# init replset with defaults
mongo 0.0.0.0 --eval "rs.initiate()"
echo "Waiting to become a master"
echo 'while (!db.isMaster().ismaster) { sleep(100); }' | mongo
echo "I'm the master!"