nginx-proxy-manager/bin/npm

21 lines
505 B
Plaintext
Raw Normal View History

2017-12-20 18:02:37 -05:00
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if hash realpath 2>/dev/null; then
export CODEBASE=$(realpath $SCRIPT_DIR/..)
elif hash grealpath 2>/dev/null; then
export CODEBASE=$(grealpath $SCRIPT_DIR/..)
else
export CODEBASE=$(readlink -e $SCRIPT_DIR/..)
fi
if [ -z "$CODEBASE" ]; then
echo "Unable to determine absolute codebase directory"
exit 1
fi
cd "$CODEBASE"
2018-05-08 19:47:51 -04:00
/usr/local/bin/docker-compose run --no-deps --rm -w /srv/manager app npm $@
2017-12-20 18:02:37 -05:00
exit $?