-
Notifications
You must be signed in to change notification settings - Fork 116
Description
Below is the YML file I wrote myself. Are there any issues? Currently, the alarm-server container is unable to obtain the PV signal from another IP device on the LAN, while the local host's PV signal can be retrieved without any problem.
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.2
hostname: elasticsearch
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 30s
timeout: 10s
retries: 5
ports:
- "9200:9200"
environment:
discovery.type: single-node
bootstrap.memory_lock: "true"
xpack.security.enabled: "false"
ES_JAVA_OPTS: "-Xmx1G"
http.host: 0.0.0.0
volumes:
- ./elasticsearch/data:/usr/share/elasticsearch/data
networks:
- alarm-network
zookeeper:
image: confluentinc/cp-zookeeper:7.4.0
hostname: zookeeper
healthcheck:
test: nc -z localhost 2181 || exit -1
interval: 10s
timeout: 10s
retries: 3
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 4000
ZOOKEEPER_INIT_LIMIT: 20
ZOOKEEPER_SYNC_LIMIT: 10
KAFKA_HEAP_OPTS: "-Xmx512M"
volumes:
- ./zookeeper/data:/var/lib/zookeeper/data
- ./zookeeper/log:/var/lib/zookeeper/log
ports:
- 2181:2181
networks:
- alarm-network
kafka:
image: confluentinc/cp-kafka:7.4.0
hostname: kafka
depends_on:
zookeeper:
condition: service_healthy
ports:
- "9092:9092"
- "29092:29092"
environment:
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:19092,EXTERNAL://localhost:9092,DOCKER://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
KAFKA_HEAP_OPTS: "-Xmx1G"
KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 30000
KAFKA_ADVERTISED_HOST_NAME: kafka
healthcheck:
test: ["CMD", "kafka-topics", "--bootstrap-server", "localhost:19092", "--list"]
interval: 30s
timeout: 10s
retries: 5
start_period: 40s
volumes:
- ./kafka/data:/var/lib/kafka/data
- ./kafka/logs:/var/log/kafka
networks:
- alarm-network
alarmserver:
image: ghcr.io/controlsystemstudio/phoebus/service-alarm-server:master
restart: unless-stopped
depends_on:
kafka:
condition: service_healthy
elasticsearch:
condition: service_healthy
environment:
EPICS_PVA_ADDR_LIST: ${HOST_IP_ADDRESS}
EPICS_CA_ADDR_LIST="203.202.2.99:5078" # No Useful, Why?
EPICS_CA_AUTO_ADDR_LIST="NO"
ALARM_RESTORE_STATE: "true"
ALARM_ELASTICSEARCH_ENABLED: "true"
ALARM_ELASTICSEARCH_URL: "http://elasticsearch:9200"
ALARM_ELASTICSEARCH_INDEX: "alarms"
volumes:
- /home:/home
command: >
/bin/bash -c "
java -jar /alarmserver/service-alarm-server-*.jar -server kafka:19092 -noshell"
networks:
- alarm-network
alarmlogger:
image: ghcr.io/controlsystemstudio/phoebus/service-alarm-logger:master
depends_on:
kafka:
condition: service_healthy
elasticsearch:
condition: service_healthy
ports:
- "8080:8080"
environment:
LOGGING_LEVEL_ORG_PHOEBUS: "INFO"
command: >
java -jar /alarmlogger/service-alarm-logger-*.jar
-bootstrap.servers kafka:19092
-es_host elasticsearch
-es_port 9200
-noshell
networks:
- alarm-network
networks:
alarm-network:
driver: bridge