OnlineJudgeFE/deploy/run.sh
2017-11-13 21:45:22 +08:00

23 lines
383 B
Bash

#!/bin/sh
base=/OJ_FE
build_vendor_dll()
{
if [ ! -e "${base}/build/vendor-manifest.json" ]
then
npm run build:dll
fi
}
cd $base
npm install --registry=https://registry.npm.taobao.org && \
build_vendor_dll && \
npm run build
if [ $? -ne 0 ]; then
echo "Build error, please check node version and package.json"
exit 1
fi
exec nginx -c /OJ_FE/deploy/nginx.conf