{"id":49762578,"url":"https://github.com/mendoc/pontis-hooks","last_synced_at":"2026-05-11T10:00:16.498Z","repository":{"id":345577355,"uuid":"1183232814","full_name":"mendoc/pontis-hooks","owner":"mendoc","description":"Serveur webhook pour le projet Pontis","archived":false,"fork":false,"pushed_at":"2026-03-19T17:58:39.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T10:00:04.829Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mendoc.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-16T12:04:26.000Z","updated_at":"2026-03-19T17:58:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mendoc/pontis-hooks","commit_stats":null,"previous_names":["mendoc/pontis-hooks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mendoc/pontis-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendoc%2Fpontis-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendoc%2Fpontis-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendoc%2Fpontis-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendoc%2Fpontis-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mendoc","download_url":"https://codeload.github.com/mendoc/pontis-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendoc%2Fpontis-hooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32889971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"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":[],"created_at":"2026-05-11T10:00:03.717Z","updated_at":"2026-05-11T10:00:16.459Z","avatar_url":"https://github.com/mendoc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pontis-hooks\n\nServeur webhook GitHub qui déploie automatiquement des applications Docker Compose à chaque push sur la branche par défaut.\n\n## Fonctionnement\n\n1. GitHub envoie `POST /deploy/:slug` à chaque push\n2. La signature HMAC-SHA256 est vérifiée\n3. Le fichier `docker-compose.yml` (ou `compose.yml`) est récupéré depuis le dépôt\n4. Il est écrit dans le répertoire du projet cible\n5. Les commandes `docker compose pull`, `up -d` et `image prune -f` sont exécutées\n\nUn seul déploiement à la fois est autorisé par slug.\n\n## Variables d'environnement\n\n| Variable | Obligatoire | Description |\n|---|---|---|\n| `GITHUB_WEBHOOK_SECRET` | Oui | Secret HMAC configuré dans GitHub |\n| `APPS_DIR` | Oui | Répertoire de base des applications |\n| `GITHUB_TOKEN` | Non | Token d'accès pour les dépôts privés |\n| `PATHS_CONFIG_FILE` | Non | Chemin vers un fichier JSON de mapping slug → répertoire |\n\n### Format de `PATHS_CONFIG_FILE`\n\n```json\n{\n  \"mon-app\": \"/chemin/absolu/vers/mon-app\",\n  \"autre-app\": \"/opt/apps/autre-app\"\n}\n```\n\nSans ce fichier, le répertoire utilisé est `APPS_DIR/slug`.\n\n## Démarrage\n\n```bash\n# Local\nnpm start\n\n# Docker Compose\ndocker-compose up -d\n```\n\n## Configuration d'un webhook GitHub\n\nDans les paramètres du dépôt → **Webhooks** → **Add webhook** :\n\n- **Payload URL** : `https://hooks.pontis.ongoua.pro/deploy/\u003cslug\u003e`\n- **Content type** : `application/json`\n- **Secret** : valeur de `GITHUB_WEBHOOK_SECRET`\n- **Events** : `Just the push event`\n\n## Déploiement de l'image\n\n```bash\nnpm run deploy\n```\n\nNécessite `GHCR_TOKEN` dans l'environnement ou dans `.env`. Publie sur `ghcr.io/mendoc/pontis-hooks`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendoc%2Fpontis-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmendoc%2Fpontis-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendoc%2Fpontis-hooks/lists"}