mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-24 22:39:25 +01:00
add nodebb
This commit is contained in:
20
nodebb/docker-entrypoint.sh
Executable file
20
nodebb/docker-entrypoint.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
export NODE_ENV=production
|
||||
export silent=false
|
||||
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
|
||||
fi
|
||||
|
||||
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
||||
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user