fix(kestra-init): use alpine+curl instead of kestra image to avoid 413
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 34s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m4s
Build and Push Docker Images / Build Integrator (push) Successful in 56s
Build and Push Docker Images / Build Kestra Init (push) Successful in 32s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 34s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m4s
Build and Push Docker Images / Build Integrator (push) Successful in 56s
Build and Push Docker Images / Build Kestra Init (push) Successful in 32s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
kestra/kestra:latest is ~500MB; the registry rejects the push. The init container only needs to POST flow YAMLs to the Kestra REST API (/api/v1/flows/import), which curl handles fine from a tiny alpine base. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
FROM kestra/kestra:latest
|
||||
FROM alpine:3.19
|
||||
RUN apk add --no-cache curl
|
||||
COPY flows/ /flows/
|
||||
CMD ["flow", "namespace", "update", "schoolcompare.data", "/flows", "--no-delete"]
|
||||
COPY docker/kestra-init.sh /kestra-init.sh
|
||||
RUN chmod +x /kestra-init.sh
|
||||
CMD ["/kestra-init.sh"]
|
||||
|
||||
17
integrator/docker/kestra-init.sh
Normal file
17
integrator/docker/kestra-init.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
KESTRA_URL="${KESTRA_URL:-http://kestra:8080}"
|
||||
|
||||
echo "Importing flows into Kestra at ${KESTRA_URL}..."
|
||||
|
||||
for f in /flows/*.yml; do
|
||||
echo " -> $(basename "$f")"
|
||||
curl -sf -X POST "${KESTRA_URL}/api/v1/flows/import" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "fileUpload=@${f}" \
|
||||
|| { echo "Failed to import $(basename "$f")"; exit 1; }
|
||||
echo ""
|
||||
done
|
||||
|
||||
echo "All flows imported."
|
||||
Reference in New Issue
Block a user