feat: Enable Git operations within a specified deployment directory by adding cwd options and configuring Git to trust the deploy directory.

This commit is contained in:
syntaxbullet
2026-01-30 14:56:29 +01:00
parent 9ff679ee5c
commit 35ecea16f7
2 changed files with 26 additions and 13 deletions

View File

@@ -39,7 +39,8 @@ RUN apt-get update && apt-get install -y \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt-get update \
&& apt-get install -y docker-ce-cli \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& git config --system --add safe.directory /app/deploy
# Copy only what's needed for production
COPY --from=builder --chown=appuser:appgroup /app/node_modules ./node_modules