1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-24 07:48:38 +00:00
dockerfiles/nodebb/docker-entrypoint.sh
2016-04-02 07:52:59 +08:00

23 lines
452 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
if [ -e "$BB_SOURCE/config.json" ]; then
cp "$BB_SOURCE/config.json" "$BB_CONTENT/config.json"
fi
fi
if [ -e "$BB_CONTENT/config.json" ]; then
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
fi
exec "$@"
fi
exec "$@"