Files
windmill-git-sync/setup.sh
Bill c838fa568c Initial commit: Windmill Git Sync service
Add containerized service for syncing Windmill workspaces to Git repositories.

Features:
- Flask webhook server for triggering syncs from Windmill
- wmill CLI integration for pulling workspace content
- Automated Git commits and push to remote repository
- Network-isolated (only accessible within Docker network)
- Designed to integrate with existing Windmill docker-compose files

Key components:
- Docker container with Python 3.11, wmill CLI, Git, and Flask
- Sync engine with error handling and logging
- External volume support for persistent workspace data
- Comprehensive documentation (README.md and CLAUDE.md)
2025-11-08 18:40:26 -05:00

32 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
# Setup script for windmill-git-sync
set -e
echo "Setting up Windmill Git Sync..."
# Create .env file if it doesn't exist
if [ ! -f .env ]; then
echo "Creating .env file from template..."
cp .env.example .env
echo "⚠️ Please edit .env with your configuration"
else
echo "✓ .env file already exists"
fi
# Create Docker volume if it doesn't exist
if ! docker volume inspect windmill-workspace-data >/dev/null 2>&1; then
echo "Creating windmill-workspace-data Docker volume..."
docker volume create windmill-workspace-data
echo "✓ Volume created"
else
echo "✓ windmill-workspace-data already exists"
fi
echo ""
echo "Setup complete! Next steps:"
echo "1. Edit .env with your Windmill and Git configuration"
echo "2. Add the windmill-git-sync service block from docker-compose.yml to your Windmill docker-compose file"
echo "3. Run: docker-compose up -d windmill-git-sync"
echo "4. Test from within Docker network: docker-compose exec windmill_server curl -X POST http://windmill-git-sync:8080/sync"