1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-27 09:18:43 +00:00
dockerfiles/nodebb/docker-entrypoint.sh

21 lines
454 B
Bash
Raw Normal View History

2016-01-15 23:19:42 +00:00
#!/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 "$@"