commit f7970692a64c7732048ff81bc884648bef7da0d1 Author: Bas Grolleman Date: Sun Sep 13 09:56:07 2026 +0200 Initial commit: Dockerfile, CI, README diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f65b1f9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +stages: + - build + +build: + stage: build + image: docker:latest + services: + - docker:dind + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" + script: + - docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:latest" . + - docker push --all-tags "$CI_REGISTRY_IMAGE" + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4ca79d4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM alpine:latest + +RUN apk add --no-cache \ + curl \ + docker-cli \ + docker-cli-compose && \ + wget -O /usr/local/bin/webhook \ + https://github.com/adnanh/webhook/releases/download/2.8.2/webhook-linux-amd64 && \ + chmod +x /usr/local/bin/webhook + +EXPOSE 9000 +ENTRYPOINT ["webhook"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..0bd04eb --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# nas-webhook + +Lightweight webhook container for NAS auto-deploy. Alpine-based with `docker-cli` and `docker-cli-compose` included so hooks can run `docker compose pull && docker compose up -d`. + +## Image + +``` +registry.gitlab.com/bgrolleman/nas-webhook:latest +``` + +## Usage + +See the [webhook documentation](https://github.com/adnanh/webhook) for hook configuration. + +Requires `/var/run/docker.sock` mounted to execute Docker commands from within the container.