This project is a GitOps-based Nginx Management System designed to bridge the gap between Git repositories and remote Nginx servers. It ensures configuration consistency, safety, and visibility across multiple environments (Production/Preview).
- Git as Source of Truth: All configurations are managed via Git.
- Agentless: Operates via SSH/SFTP without agents on Nginx nodes.
- Safety: Implements dry-run checks (
nginx -t) and atomic updates to prevent bad configurations from reaching production.
- Backend: Go (Golang) service.
- State: Uses
etcdfor state coordination. - Git: Uses
go-gitfor internal repository management.
- State: Uses
- Frontend: React Single Page Application (SPA).
- Build Tool: Vite.
- UI Framework: Ant Design.
- Connectivity: Connects to Nginx servers via standard SSH/SFTP.
- Real-time Synchronization: Automatically fetches updates from remote Git repositories (Gitea/GitLab/GitHub).
- Multi-Environment Support: distinct handling for "Production" vs "Preview" environments.
- Smart Rebase: Preserves local hot-fixes by rebasing them on top of remote updates.
- Visual Diff: 3-way comparison between Git source, Etcd state, and actual Remote Server config.
- Go: 1.22+
- Node.js: 18+
- Database: Etcd 3.5+
- Infrastructure: Nginx servers accessible via SSH
Configuration is managed in configs/config.yaml.
cp configs/config.yaml.example configs/config.yaml
# Edit config.yaml to define Git repo and Nginx server credentialsBackend Service:
go run cmd/gitops-nginx/main.goFrontend Application:
cd ui
npm install
npm run devNote: As of the last analysis, this directory primarily contains documentation. The source code directories (cmd/, ui/, configs/) referenced in the documentation were not present in the current view. This context is derived from the project's README.