mirror of
https://github.com/vimagick/dockerfiles.git
synced 2026-01-03 11:34:57 +01:00
fix nodebb
This commit is contained in:
@@ -7,12 +7,16 @@ export daemon=false
|
||||
|
||||
if [[ "$*" == npm*start* ]]; then
|
||||
if [ ! -e "$BB_CONTENT/config.json" ]; then
|
||||
sed "s/SECRET/$(node -e 'console.log(require("node-uuid").v4())')/" \
|
||||
"$BB_SOURCE/config.example.json" > "$BB_CONTENT/config.json"
|
||||
npm install connect-redis
|
||||
if [ -e "$BB_SOURCE/config.json" ]; then
|
||||
cp "$BB_SOURCE/config.json" "$BB_CONTENT/config.json"
|
||||
fi
|
||||
fi
|
||||
|
||||
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
||||
if [ -e "$BB_CONTENT/config.json" ]; then
|
||||
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
||||
[ -d "$BB_SOURCE/node_modules/redis" ] || npm install redis
|
||||
[ -d "$BB_SOURCE/node_modules/connect-redis" ] || npm install connect-redis
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user