Files
nuzlocke-tracker/.beans/nuzlocke-tracker-jzqz--configure-portainer-webhook-for-automated-redeploy.md
Julian Tabel 03f07ebee5 Add deploy script and update prod compose
Deploy script builds and pushes images to Gitea registry, then triggers
Portainer stack redeployment via API. Includes preflight checks for
branch and uncommitted changes. Also renames prod DB volume to avoid
conflicts with dev and changes frontend port to 9080.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:28:17 +01:00

28 lines
824 B
Markdown

---
# nuzlocke-tracker-jzqz
title: Configure Portainer API for automated redeployment
status: in-progress
type: task
priority: normal
created_at: 2026-02-09T15:30:45Z
updated_at: 2026-02-09T17:22:17Z
parent: nuzlocke-tracker-ahza
blocking:
- nuzlocke-tracker-hwyk
---
Use the Portainer CE REST API to trigger stack redeployments from the deploy script.
Portainer webhooks are a Business-only feature, so we use the API directly instead.
## Approach
1. Authenticate with the Portainer API to get a JWT token
2. Call the stack update endpoint with `pullImage: true` to pull latest images and recreate containers
## Checklist
- [ ] Identify the stack ID in Portainer (via API or UI)
- [ ] Test API authentication (`POST /api/auth`)
- [ ] Test triggering a stack redeploy via API
- [ ] Integrate into the deploy script