Add git user configuration support

Add required git user configuration to enable commits from within the container.
This change ensures proper attribution of git commits made inside the container by:

- Adding GIT_USER_NAME and GIT_USER_EMAIL to .env.example
- Configuring git user globally during Docker build
- Adding documentation for git configuration requirements
- Updating README with clearer setup instructions and requirements

The configuration is now required as part of the initial setup to prevent
issues with unattributed commits when using git inside the container.
This commit is contained in:
Vishal Jain
2025-06-18 13:54:58 +01:00
parent 7b50165881
commit 9d1f8d0661
8 changed files with 261 additions and 26 deletions

View File

@@ -82,6 +82,18 @@ RUN bash -c 'source /app/.env && \
echo "No Twilio credentials found, skipping MCP configuration"; \
fi'
# Configure git user during build
RUN bash -c 'source /app/.env && \
if [ -n "$GIT_USER_NAME" ] && [ -n "$GIT_USER_EMAIL" ]; then \
echo "Configuring git user: $GIT_USER_NAME <$GIT_USER_EMAIL>" && \
git config --global user.name "$GIT_USER_NAME" && \
git config --global user.email "$GIT_USER_EMAIL" && \
echo "Git configuration complete"; \
else \
echo "Warning: GIT_USER_NAME and GIT_USER_EMAIL not set in .env"; \
echo "Git commits will require manual configuration"; \
fi'
# Set working directory to mounted volume
WORKDIR /workspace