mirror of
https://github.com/status-im/codimd.git
synced 2025-01-11 16:54:17 +00:00
f1594c56e2
1. upgrade node.js version from 8.16.0 to 8.16.2 2. upgrade pcheck to support connection string from environment 3. upgrade pcheck to fix connection string contains underscore might not resolve correctly Signed-off-by: BoHong Li <raccoon@hackmd.io>
22 lines
344 B
Bash
Executable File
22 lines
344 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
if [[ "$#" -gt 0 ]]; then
|
|
exec "$@"
|
|
exit $?
|
|
fi
|
|
|
|
# check database and redis is ready
|
|
pcheck -env CMD_DB_URL
|
|
|
|
# run DB migrate
|
|
NEED_MIGRATE=${CMD_AUTO_MIGRATE:=true}
|
|
|
|
if [[ "$NEED_MIGRATE" = "true" ]] && [[ -f .sequelizerc ]] ; then
|
|
npx sequelize db:migrate
|
|
fi
|
|
|
|
# start application
|
|
node app.js
|