Add the following volume and service definitions to a docker-compose.yml file:
services:
webhook:
image: jkjoy/webhook
container_name: webhook
command: -verbose -hooks=hooks.yml -hotreload
environment:
- TZ=Asia/Chongqing #中国时区
- LANG=C.UTF-8 #中文支持
volumes:
- ./config:/config:ro
ports:
- 9000:9000
restart: always
- id: redeploy-webhook
execute-command: "/var/scripts/redeploy.sh"
command-working-directory: "/var/webhook"
让我们定义一个名为redeploy-webhook的简单钩子,它将运行位于/var/scripts/redeploy.sh中的 部署脚本。确保您的bash脚本具有#!/bin/sh 在上面。
Content type
Image
Digest
sha256:ed1d4a9cf…
Size
10.9 MB
Last updated
over 1 year ago
docker pull jkjoy/webhook