mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Wait for DB on boot
This commit is contained in:
parent
7b3e2c58e2
commit
cac74122f2
4 changed files with 13 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
|
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
|
||||||
appVersion: "0"
|
appVersion: "v1.85.0"
|
||||||
files:
|
files:
|
||||||
userUploads:
|
userUploads:
|
||||||
- README.md
|
- README.md
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# This file will store the config env variables needed by the app
|
# This file will store the config env variables needed by the app
|
||||||
readonly CONF=/build/env.config
|
readonly CONF=/build/env.config
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ FIBERS_VERSION=2.0.0
|
||||||
ARCHITECTURE=linux-x64
|
ARCHITECTURE=linux-x64
|
||||||
NODE_VERSION=v10.14.1
|
NODE_VERSION=v10.14.1
|
||||||
|
|
||||||
sudo yum groupinstall 'Development Tools'
|
sudo yum groupinstall -y 'Development Tools'
|
||||||
sudo yum install -y http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
|
sudo yum install -y http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
|
||||||
sudo yum install -y git
|
sudo yum install -y git
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euxo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
readonly CONF=/build/env.config
|
readonly CONF=/build/env.config
|
||||||
|
|
||||||
source ${CONF}
|
source ${CONF}
|
||||||
|
|
||||||
|
# wait for DB
|
||||||
|
check_db() {
|
||||||
|
mongo $MONGO_URL --eval "db.runCommand( { connectionStatus: 1} )" --quiet | python -c 'import json,sys;obj=json.load(sys.stdin);code = 0 if obj["ok"]==1 else 1; sys.exit(code);'
|
||||||
|
}
|
||||||
|
until check_db; do
|
||||||
|
period=5
|
||||||
|
echo "Cannot connect to db, waiting ${period} seconds before trying again..."
|
||||||
|
sleep ${period}
|
||||||
|
done
|
||||||
|
|
||||||
cd /build
|
cd /build
|
||||||
echo "starting the wekan service..."
|
echo "starting the wekan service..."
|
||||||
node main.js
|
node main.js
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue