version: "2.2"
services:
  jobmanager:
    image: flink:1.16.0-scala_2.12
    volumes:
      - /data/soft/flink/session-flink/opt-flink/conf:/opt/flink/conf
      - /data/soft/flink/session-flink/opt-flink/log:/opt/flink/log
    ports:
      - "8081:8081"
    command: jobmanager
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager
  taskmanager:
    image: flink:1.16.0-scala_2.12
    volumes:
      - /data/soft/flink/session-flink/opt-flink/conf:/opt/flink/conf
      - /data/soft/flink/session-flink/opt-flink/log:/opt/flink/log
    depends_on:
      - jobmanager
    command: taskmanager
    scale: 1
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager