4 Commits

Author SHA1 Message Date
Head of Product & Engineering
72345a5129 fix: bump Go image to 1.26 to match go.mod requirement
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
go.mod declares go 1.26.1; docker build was failing with
"go.mod requires go >= 1.26.1 (running go 1.22.12; GOTOOLCHAIN=local)"

- Dockerfile: golang:1.22-alpine → golang:1.26-alpine
- .woodpecker.yml: test image 1.22-alpine → 1.26-alpine;
  gosec image 1.22-bookworm → 1.26-bookworm
- CLAUDE.md: update stack note to Go 1.26+

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 18:34:21 +02:00
Head of Product & Engineering
7745d205cb feat: add production deployment artifacts for ghl.cast.ph (Vultr)
Align Woodpecker CI pipeline with team standard (cast-backend pattern):
- Replace plugins/docker with woodpeckerci/plugin-docker-buildx
- Use git.sds.dev registry; tag with CI_COMMIT_SHA short + latest
- Use team secret names: registry_user/password, deploy_ssh_key
- Add golangci-lint, semgrep, gosec, trivy-fs, trivy-secrets security gates
- Deploy on push to main (not on tag): build-and-push then deploy step
  calls bash /opt/cast-ghl-provider/deploy/deploy.sh on server
- Add Telegram notification on success/failure

docker-compose.yaml: add image: git.sds.dev/cast/cast-ghl-provider:latest
(server pulls from registry; build: kept for local dev only)

deploy/deploy.sh: simplified to docker compose pull + up
(build now happens in CI, not on the server)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 14:12:27 +02:00
Head of Product & Engineering
f29b39b40c feat: adapt deployment for existing Docker server with nginx-proxy + Woodpecker
- docker-compose.yaml: remove port binding; add VIRTUAL_HOST/LETSENCRYPT_HOST
  env vars for nginx-proxy auto-routing; add internal + external proxy networks
- .woodpecker.yml: consolidate build steps into single ci step; add deploy-main
  step that builds + deploys on every push to main; keep deploy-tag for
  registry-pull deploys on version tags
- deploy/deploy.sh: simplify for manual/emergency use on existing server;
  add --from-registry flag for registry pull vs local build
- Remove deploy/setup-server.sh and deploy/nginx/ (not needed on existing server)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 14:06:21 +02:00
Head of Product & Engineering
a40a4aa626 feat: initial implementation of Cast GHL Provider
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Complete MVP implementation of the Cast GHL Conversation Provider bridge:
- Go module setup with chi router and mongo-driver dependencies
- Config loading with env var validation and defaults
- MongoDB token store with upsert, get, update, delete operations
- Cast.ph SMS client with 429 retry logic and typed errors
- Phone number normalization (E.164 ↔ Philippine local format)
- GHL OAuth 2.0 install/callback/refresh flow
- GHL webhook handler with ECDSA signature verification (async dispatch)
- GHL API client for message status updates and inbound message stubs
- Multi-stage Dockerfile, docker-compose with MongoDB, Woodpecker CI pipeline
- Unit tests for phone normalization, Cast client, GHL webhook, and OAuth handlers

Co-Authored-By: SideKx <sidekx.ai@sds.dev>
2026-04-04 17:27:05 +02:00