1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-14 11:23:02 +02:00
dockerfiles/nodebb/docker-entrypoint.sh
2016-01-16 07:19:42 +08:00

21 lines
454 B
Bash
Executable File

#!/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 "$@"