| ################################################################################ |
| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| ################################################################################ |
| version: "2.1" |
| |
| services: |
| |
| ############################################################### |
| # StateFun runtime |
| ############################################################### |
| |
| statefun: |
| image: apache/flink-statefun-playground:3.3.0 |
| ports: |
| - "8081:8081" |
| depends_on: |
| - kafka |
| volumes: |
| - ./module.yaml:/module.yaml |
| |
| ############################################################### |
| # Kafka for ingress and egress |
| ############################################################### |
| |
| kafka: |
| image: docker.vectorized.io/vectorized/redpanda:v21.8.1 |
| command: |
| - redpanda start |
| - --smp 1 |
| - --memory 512M |
| - --overprovisioned |
| - --set redpanda.default_topic_replications=1 |
| - --set redpanda.auto_create_topics_enabled=true |
| - --kafka-addr INSIDE://0.0.0.0:9094,OUTSIDE://0.0.0.0:9092 |
| - --advertise-kafka-addr INSIDE://kafka:9094,OUTSIDE://kafka:9092 |
| - --pandaproxy-addr 0.0.0.0:8089 |
| - --advertise-pandaproxy-addr kafka:8089 |
| hostname: kafka |
| ports: |
| - "8089:8089" |
| - "9092:9092" |
| - "9094:9094" |
| |
| ############################################################### |
| # Forward a port 8000 from the host's machine |
| ############################################################### |
| |
| host-machine: |
| image: qoomon/docker-host@sha256:e0f021dd77c7c26d37b825ab2cbf73cd0a77ca993417da80a14192cb041937b0 |
| cap_add: [ 'NET_ADMIN', 'NET_RAW' ] |
| mem_limit: 8M |
| restart: on-failure |
| environment: |
| PORTS: 8000 |
| |
| ############################################################### |
| # Simple Kafka JSON producer to simulate ingress events |
| ############################################################### |
| |
| producer: |
| image: ververica/statefun-playground-producer:latest |
| environment: |
| APP_PATH: /mnt/input-example.json |
| APP_KAFKA_HOST: kafka:9092 |
| APP_KAFKA_TOPIC: names |
| APP_JSON_PATH: name |
| APP_DELAY_SECONDS: 1 |
| volumes: |
| - ./input-example.json:/mnt/input-example.json |