fix(kestra): load flows via kestra-init one-shot container
Some checks failed
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 34s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m10s
Build and Push Docker Images / Trigger Portainer Update (push) Has been cancelled
Build and Push Docker Images / Build Integrator (push) Has been cancelled
Some checks failed
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 34s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m10s
Build and Push Docker Images / Trigger Portainer Update (push) Has been cancelled
Build and Push Docker Images / Build Integrator (push) Has been cancelled
--flow-path is not a valid Kestra flag; flows must be pushed explicitly. kestra-init waits for Kestra to pass its healthcheck then runs 'kestra flow namespace update schoolcompare.data /flows --no-delete' to import all flow YAMLs. Runs once on stack start; --no-delete means any flows created manually in the UI are not removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,12 +82,11 @@ services:
|
|||||||
kestra:
|
kestra:
|
||||||
image: kestra/kestra:latest
|
image: kestra/kestra:latest
|
||||||
container_name: schoolcompare_kestra
|
container_name: schoolcompare_kestra
|
||||||
command: server standalone --flow-path=/flows
|
command: server standalone
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- kestra_storage:/app/storage
|
- kestra_storage:/app/storage
|
||||||
- ./integrator/flows:/flows
|
|
||||||
environment:
|
environment:
|
||||||
KESTRA_CONFIGURATION: |
|
KESTRA_CONFIGURATION: |
|
||||||
datasources:
|
datasources:
|
||||||
@@ -111,6 +110,44 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- schoolcompare-network
|
- schoolcompare-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -sf http://localhost:8080/api/v1/flows/search || exit 1"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 60s
|
||||||
|
|
||||||
|
# One-shot container: imports flow YAMLs into Kestra after it's healthy
|
||||||
|
kestra-init:
|
||||||
|
image: kestra/kestra:latest
|
||||||
|
container_name: schoolcompare_kestra_init
|
||||||
|
volumes:
|
||||||
|
- ./integrator/flows:/flows:ro
|
||||||
|
environment:
|
||||||
|
KESTRA_CONFIGURATION: |
|
||||||
|
datasources:
|
||||||
|
postgres:
|
||||||
|
url: jdbc:postgresql://db:5432/kestra
|
||||||
|
driverClassName: org.postgresql.Driver
|
||||||
|
username: schoolcompare
|
||||||
|
password: schoolcompare
|
||||||
|
kestra:
|
||||||
|
repository:
|
||||||
|
type: postgres
|
||||||
|
queue:
|
||||||
|
type: postgres
|
||||||
|
storage:
|
||||||
|
type: local
|
||||||
|
local:
|
||||||
|
base-path: /tmp/kestra-init-storage
|
||||||
|
command: >
|
||||||
|
flow namespace update schoolcompare.data /flows --no-delete
|
||||||
|
depends_on:
|
||||||
|
kestra:
|
||||||
|
condition: service_healthy
|
||||||
|
networks:
|
||||||
|
- schoolcompare-network
|
||||||
|
restart: no
|
||||||
|
|
||||||
# Data integrator — Python microservice called by Kestra
|
# Data integrator — Python microservice called by Kestra
|
||||||
integrator:
|
integrator:
|
||||||
|
|||||||
Reference in New Issue
Block a user