diff --git a/.woodpecker.yml b/.woodpecker.yml index 401b497..04cd917 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,15 +1,28 @@ +# Deploy template for reze-test. +# +# Automatic deploys are DISABLED: deployments are triggered from the Dokploy UI +# (or a Gitea webhook configured there), not from CI. +# +# This pipeline is manual-only and is a no-op unless a DEPLOY_URL value is +# available in the environment (set it as a Woodpecker repository variable, or +# declare it as a secret with `from_secret: DEPLOY_URL`). +# +# To turn this back into a push-to-deploy pipeline, change the trigger to: +# +# when: +# - event: push +# branch: trunk +# +# and make sure DEPLOY_URL is set. It needs access to the internal Dokploy +# network, hence `network_mode: dokploy-network`. + when: - - event: push - branch: trunk + - event: manual steps: deploy: image: curlimages/curl:latest - # Needs Dokploy on the internal network; allowed because an admin marked this repo "trusted network". - # Pipelines otherwise run on the isolated ci-net (internet + git.kg only). network_mode: dokploy-network - environment: - DEPLOY_URL: - from_secret: DEPLOY_URL commands: - - 'curl -fsS -X POST "$${DEPLOY_URL}" -H "Content-Length: 0"' + - 'echo "reze-test: requesting redeploy from Dokploy..."' + - 'if [ -n "$${DEPLOY_URL}" ]; then curl -fsS -X POST "$${DEPLOY_URL}" -H "Content-Length: 0"; else echo "DEPLOY_URL is not set - deploy from the Dokploy UI instead."; fi' diff --git a/README.md b/README.md index d8fd392..27c206e 100644 --- a/README.md +++ b/README.md @@ -176,9 +176,10 @@ and ships a `HEALTHCHECK` that polls `http://127.0.0.1:3000/healthz` with `wget` - Build type: Dockerfile (or "Nixpacks" — the app needs nothing but Node). - Environment variable: `PORT=3000`. - Exposed port: `3000`. -- CI hook: add the repository secret `DEPLOY_URL` (the Dokploy deploy webhook URL). - `.woodpecker.yml` posts to it on every push to `trunk` so Dokploy rebuilds and - redeploys the service. +- Deploys are triggered from the Dokploy UI (or a Gitea webhook configured there). + CI does not deploy automatically: `.woodpecker.yml` is a manual-only template. If you + want a push-to-deploy hook, set a `DEPLOY_URL` repository variable (the Dokploy deploy + webhook URL) and switch the pipeline trigger back to `event: push` on `trunk`. ## License