codimd/run.sh
Knut Ahlers 56867e6eed
Port to alpine, pin version
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-10-10 13:06:27 +02:00

24 lines
440 B
Bash
Executable file

#!/bin/bash
set -euxo pipefail
cd /hackmd
if ! [ -f /config/config.json ]; then
cp config.json.default config.json
else
cp /config/config.json config.json
fi
if ! [ -f /config/.sequelizerc ]; then
cp .sequelizerc.default .sequelizerc
else
cp /config/.sequelizerc .sequelizerc
fi
if [ -f /config/client_config.js ]; then
cp /config/client_config.js public/js/config.js
fi
node_modules/.bin/sequelize db:migrate
exec npm run start