{"id":22662736,"url":"https://github.com/ilmalsalam/gitauto","last_synced_at":"2026-05-19T14:38:58.980Z","repository":{"id":267214075,"uuid":"900556228","full_name":"ilmalsalam/gitauto","owner":"ilmalsalam","description":"Git Auto Pull for Server Remote | python","archived":false,"fork":false,"pushed_at":"2024-12-10T02:38:33.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T09:13:17.332Z","etag":null,"topics":["autopull","git","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilmalsalam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-09T03:11:20.000Z","updated_at":"2024-12-10T02:38:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"4560c67c-4358-4eed-ab18-6f9e4932911a","html_url":"https://github.com/ilmalsalam/gitauto","commit_stats":null,"previous_names":["ilmalsalam/gitauto"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ilmalsalam/gitauto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilmalsalam%2Fgitauto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilmalsalam%2Fgitauto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilmalsalam%2Fgitauto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilmalsalam%2Fgitauto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilmalsalam","download_url":"https://codeload.github.com/ilmalsalam/gitauto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilmalsalam%2Fgitauto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272937020,"owners_count":25018293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autopull","git","python"],"created_at":"2024-12-09T12:15:22.010Z","updated_at":"2026-05-19T14:38:53.909Z","avatar_url":"https://github.com/ilmalsalam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Auto Pull Service\n\nThis service automatically pulls changes from specified Git repositories when updates are detected on configured branches.\n\n## Setup Instructions\n\n1. Install required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n2. Configure your repositories:\n   Edit `config.yml` and add your repository paths and branches:\n\n```yaml\ncheck_interval: 60  # Check every 1 minute\nrepositories:\n  - path: \"/path/to/your/repo\"\n    branch: \"main\"\n```\n\n3. Set up the service:\n   Ada dua cara untuk menjalankan service ini:\n\n### 1. Sebagai Daemon Process (Direkomendasikan)\n\n```bash\n# Jalankan script sebagai daemon\npython3 git_auto_pull.py --daemon\n```\n\nScript akan berjalan di background dan log akan disimpan di `git_auto.log` dalam direktori yang sama.\n\nUntuk menghentikan service:\n\n```bash\n# Cari PID dari process\nps aux | grep git_auto_pull.py\n\n# Matikan process\nkill \u003cPID\u003e  # ganti \u003cPID\u003e dengan nomor yang didapat\n```\n\n### 2. Sebagai Service Systemd (Opsional)\n\n1. Edit the service file to set your username\n\n```bash\nsudo nano git-auto-pull.service\n```\n\n2. Setup the systemd service:\n\n```bash\n# Copy the service file to systemd directory\nsudo cp git-auto-pull.service /etc/systemd/system/\n\n# Reload systemd daemon\nsudo systemctl daemon-reload\n\n# Start the service\nsudo systemctl start git-auto-pull\n\n# Enable the service to start on boot\nsudo systemctl enable git-auto-pull\n```\n\n4. Check service status:\n\n```bash\nsudo systemctl status git-auto-pull\n```\n\n5. View logs:\n\n```bash\n# View service logs\nsudo journalctl -u git-auto-pull\n\n# View application logs\ntail -f git_auto_pull.log\n```\n\n## Configuration\n\nFile `config.yml`:\n\n- `check_interval`: Interval pengecekan dalam detik\n- `repositories`: Daftar repository yang akan dimonitor\n  - `path`: Path absolut ke repository\n  - `branch`: Nama branch yang akan dimonitor\n  - `type`: (Opsional) Tipe repository - tulis \"nextjs\" untuk repository NextJS\n  - `pm2_ids`: List ID proses PM2 yang perlu di-restart [1, 2, dst]\n  - `build_command`: (Khusus NextJS) Perintah build yang akan dijalankan\n\nContoh konfigurasi lengkap:\n\n```yaml\ncheck_interval: 60  # Check setiap 1 menit\nrepositories:\n  # Repository NextJS\n  - path: \"/home/username/nextjs-app\"\n    branch: \"master\"\n    type: \"nextjs\"\n    pm2_ids: [1, 2]\n    build_command: \"npm run build\"\n  \n  # Repository Standard\n  - path: \"/home/username/standard-app\"\n    branch: \"main\"\n    pm2_ids: [3]\n```\n\n## Fitur PM2\n\nScript akan menangani proses PM2 untuk semua tipe repository:\n\n1. Untuk repository standard:\n\n   - Menghentikan proses PM2 yang ditentukan\n   - Melakukan git pull\n   - Menjalankan kembali proses PM2\n2. Untuk repository NextJS:\n\n   - Menghentikan proses PM2 yang ditentukan\n   - Melakukan git pull\n   - Menjalankan perintah build\n   - Menjalankan kembali proses PM2\n\nJika terjadi error:\n\n- Error akan dicatat di log\n- Proses PM2 akan otomatis dicoba untuk dijalankan kembali\n- Detail error dapat diperiksa di file log\n\n## Troubleshooting\n\n1. Make sure the user running the service has proper Git credentials and permissions\n2. Check the logs for any errors\n3. Ensure the repository paths in config.yml are correct\n4. Verify the branches specified exist in the remote repository\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filmalsalam%2Fgitauto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filmalsalam%2Fgitauto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filmalsalam%2Fgitauto/lists"}