2026-02-09 16:32:04 +01:00
|
|
|
---
|
|
|
|
|
# nuzlocke-tracker-jzqz
|
2026-02-09 18:28:17 +01:00
|
|
|
title: Configure Portainer API for automated redeployment
|
|
|
|
|
status: in-progress
|
2026-02-09 16:32:04 +01:00
|
|
|
type: task
|
|
|
|
|
priority: normal
|
|
|
|
|
created_at: 2026-02-09T15:30:45Z
|
2026-02-09 18:28:17 +01:00
|
|
|
updated_at: 2026-02-09T17:22:17Z
|
2026-02-09 16:32:04 +01:00
|
|
|
parent: nuzlocke-tracker-ahza
|
|
|
|
|
blocking:
|
|
|
|
|
- nuzlocke-tracker-hwyk
|
|
|
|
|
---
|
|
|
|
|
|
2026-02-09 18:28:17 +01:00
|
|
|
Use the Portainer CE REST API to trigger stack redeployments from the deploy script.
|
2026-02-09 16:32:04 +01:00
|
|
|
|
2026-02-09 18:28:17 +01:00
|
|
|
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
|