This commit is contained in:
2026-07-01 16:40:33 +05:00
parent 783de4e040
commit 6bc9f7d933
6 changed files with 77 additions and 6 deletions

23
docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
set -e
if [ -n "$GIT_REPO_URL" ]; then
if [ -d /app/.git ]; then
cd /app
git stash --include-untracked 2>/dev/null || true
git pull origin master 2>&1
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
fi
exec "$@"