docs: Processing Kafka messages with Windmill Perpetual scripts (#2859)

* docs: Processing Kafka messages with Windmill Perpetual scripts

* Add while loop and update readme

* move README to blog post
This commit is contained in:
Guillaume Bouvignies
2023-12-19 12:55:38 +01:00
committed by GitHub
parent 5dd58094fd
commit d0c75002f8
2 changed files with 61 additions and 0 deletions
@@ -0,0 +1,4 @@
Service script pattern in Windmill
==================================
See [Blog Post](https://www.windmill.dev/blog/service-script-kafka)
@@ -0,0 +1,57 @@
version: "3.7"
services:
zookeeper:
image: zookeeper
kafka:
image: ubuntu/kafka
environment:
- TZ=UTC
- ZOOKEEPER_HOST=zookeeper
- ZOOKEEPER_PORT=2181
depends_on:
zookeeper:
condition: service_started
db:
image: postgres:14
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: changeme
POSTGRES_DB: windmill
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
windmill_server:
image: ghcr.io/windmill-labs/windmill:main
deploy:
replicas: 1
ports:
- 8000:8000
environment:
- DATABASE_URL=postgres://postgres:changeme@db/windmill?sslmode=disable
- MODE=server
depends_on:
db:
condition: service_healthy
windmill_worker:
image: ghcr.io/windmill-labs/windmill:main
pull_policy: always
deploy:
replicas: 3
restart: unless-stopped
environment:
- DATABASE_URL=postgres://postgres:changeme@db/windmill?sslmode=disable
- MODE=worker
- WORKER_GROUP=default
depends_on:
db:
condition: service_healthy
volumes:
db_data: null