{"id":16098635,"url":"https://github.com/funnyzak/git-webhook-node-docker","last_synced_at":"2025-03-28T21:30:52.465Z","repository":{"id":114592648,"uuid":"256052612","full_name":"funnyzak/git-webhook-node-docker","owner":"funnyzak","description":"Pull your nodejs project git code into a data volume and trigger node event via Webhook.","archived":true,"fork":false,"pushed_at":"2020-04-22T08:41:34.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T19:48:04.054Z","etag":null,"topics":["docke-image","docker","git","node","npm","webhook","yarn"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/funnyzak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-04-15T22:38:25.000Z","updated_at":"2024-11-30T10:32:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"6da1db45-e672-4922-972b-313366945c91","html_url":"https://github.com/funnyzak/git-webhook-node-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyzak%2Fgit-webhook-node-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyzak%2Fgit-webhook-node-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyzak%2Fgit-webhook-node-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyzak%2Fgit-webhook-node-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funnyzak","download_url":"https://codeload.github.com/funnyzak/git-webhook-node-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246104334,"owners_count":20724124,"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","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":["docke-image","docker","git","node","npm","webhook","yarn"],"created_at":"2024-10-09T18:24:12.106Z","updated_at":"2025-03-28T21:30:52.458Z","avatar_url":"https://github.com/funnyzak.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e Not maintained anymore, please visit new Docker. [Here](https://github.com/funnyzak/git-webhook-docker)\n\n# Git Webhook Node Docker\n\nPull your nodejs project git code into a data volume and trigger node event via Webhook.\n\n[![Docker Stars](https://img.shields.io/docker/stars/funnyzak/git-webhook-node.svg?style=flat-square)](https://hub.docker.com/r/funnyzak/git-webhook-node/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/funnyzak/git-webhook-node.svg?style=flat-square)](https://hub.docker.com/r/funnyzak/git-webhook-node/)\n\nThis image is based on Alpine Linux image, which is a 166MB image.\n\nDownload size of this image is:\n\n[![](https://images.microbadger.com/badges/image/funnyzak/git-webhook-node.svg)](http://microbadger.com/images/funnyzak/git-webhook-node)\n\n[Docker hub image: funnyzak/git-webhook-node](https://hub.docker.com/r/funnyzak/git-webhook-node)\n\nDocker Pull Command: `docker pull funnyzak/git-webhook-node`\n\nWebhook Url: [http://hostname:9000/hooks/git-webhook?token=HOOK_TOKEN](#)\n\n---\n\n## Environment\n\n* go\n* nodejs\n* npm\n* yarn\n* openssh\n* zip\n* tar\n* wget\n* rsync\n* git\n* curl\n* bash\n\n---\n  \n## Available Parameters\n\nThe following flags are a list of all the currently supported options that can be changed by passing in the variables to docker with the -e flag.\n\n* **USE_HOOK** : The web hook is enabled as long as this is present.\n* **HOOK_TOKEN** : Custom hook security tokens, strings.\n* **GIT_REPO** : If it is a private repository, and is ssh link, set the private key file with the file name ***id_rsa*** must be set. If you use https link, you can also set this format link type: ***https://GIT_TOKEN@GIT_REPO***.\n* **GIT_BRANCH** : Select a branch for clone and auto hook match.\n* **GIT_EMAIL** : Set your email for git (required for git to work).\n* **GIT_NAME** : Set your name for git (required for git to work).\n* **STARTUP_COMMANDS** : Optional. Add any commands that will be run at the end of the start.sh script. left blank, will not execute.\n* **AFTER_PULL_COMMANDS** : Optional. Add any commands that will be run after pull. left blank, will not execute.\n* **BEFORE_PULL_COMMANDS** : Optional. Add any commands that will be run before pull. left blank, will not execute.\n  \n---\n\n## Volume\n\n* **/app/code** : git source code dir. docker work dir.\n* **/root/.ssh** :  ssh key folder.\n* **/custom_scripts/on_startup** :  which the scripts are executed at startup, traversing all the scripts and executing them sequentially\n* **/custom_scripts/before_pull** :  which the scripts are executed at before pull\n* **/custom_scripts/after_pull** :  which the scripts are executed at after pull\n\n### ssh-keygen\n\n`ssh-keygen -t rsa -b 4096 -C \"youremail@gmail.com\" -N \"\" -f ./id_rsa`\n\n---\n\n## Docker-Compose\n\n ```docker\nversion: '3'\nservices:\n  hookserver:\n    image: funnyzak/git-webhook-node\n    privileged: true\n    container_name: git-hook\n    working_dir: /app/code\n    logging:\n      driver: 'json-file'\n      options:\n        max-size: '1g'\n    tty: true\n    environment:\n      - TZ=Asia/Shanghai\n      - LANG=C.UTF-8\n      - USE_HOOK=1\n      - HOOK_TOKEN=hello\n      - GIT_REPO=https://github.com/vuejs/vuepress.git\n      - GIT_BRANCH=master\n      - GIT_EMAIL=youremail\n      - GIT_NAME=yourname\n      - STARTUP_COMMANDS=echo \"STARTUP_COMMANDS helllo\"\n      - AFTER_PULL_COMMANDS=echo \"AFTER_PULL_COMMANDS hello\"\n      - BEFORE_PULL_COMMANDS=echo \"AFTER_PULL_COMMANDS hello\"\n    restart: on-failure\n    ports:\n      - 1001:9000\n    volumes:\n      - ./custom_scripts:/custom_scripts\n      - ./code:/app/code\n      - ./ssh:/root/.ssh\n\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyzak%2Fgit-webhook-node-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunnyzak%2Fgit-webhook-node-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyzak%2Fgit-webhook-node-docker/lists"}