Skip to content

Commit

Permalink
docs: Processing Kafka messages with Windmill Perpetual scripts (wind…
Browse files Browse the repository at this point in the history
…mill-labs#2859)

* docs: Processing Kafka messages with Windmill Perpetual scripts

* Add while loop and update readme

* move README to blog post
  • Loading branch information
gbouv authored Dec 19, 2023
1 parent 5dd5809 commit d0c7500
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/deploy/kafka-job-adapter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Service script pattern in Windmill
==================================

See [Blog Post](https://www.windmill.dev/blog/service-script-kafka)
57 changes: 57 additions & 0 deletions examples/deploy/kafka-job-adapter/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d0c7500

Please sign in to comment.