docker
This commit is contained in:
@@ -1,23 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -n "$GIT_REPO_URL" ]; then
|
||||
mkdir -p /app/data
|
||||
if [ -d /app/.git ]; then
|
||||
cd /app
|
||||
git stash --include-untracked 2>/dev/null || true
|
||||
git pull origin master 2>&1
|
||||
git pull
|
||||
else
|
||||
rm -rf /app
|
||||
git clone "$GIT_REPO_URL" /app
|
||||
fi
|
||||
fi
|
||||
|
||||
cd /app
|
||||
mkdir -p data
|
||||
|
||||
if [ -z "$(ls node_modules 2>/dev/null)" ]; then
|
||||
echo "Installing dependencies..."
|
||||
npm install --omit=dev
|
||||
git clone "$GIT_REPO_URL" .
|
||||
fi
|
||||
|
||||
npm i
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user