Files
gia-gve-certificates/docker-entrypoint.sh
2026-07-01 16:40:33 +05:00

24 lines
390 B
Bash

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