From 14c40971f3bf9f4b12d9d977578b30b7127dce15 Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Wed, 13 Nov 2024 15:42:21 +0800 Subject: [PATCH] feat: add component facelive --- compose/facelive.yml | 18 ++++++++++++++++++ scripts/config.sh | 1 + scripts/utils.sh | 7 ++++--- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 compose/facelive.yml diff --git a/compose/facelive.yml b/compose/facelive.yml new file mode 100644 index 0000000..2fa15f9 --- /dev/null +++ b/compose/facelive.yml @@ -0,0 +1,18 @@ +services: + facelive: + image: ${REGISTRY:-registry.fit2cloud.com}/jumpserver/facelive:${VERSION} + container_name: jms_facelive + hostname: jms_facelive + restart: always + env_file: + - ${CONFIG_FILE} + volumes: + - ${VOLUME_DIR}/facelive/data:/opt/facelive/data + healthcheck: + test: "curl -fsL http://localhost:9999/facelive/health/ > /dev/null" + interval: 10s + timeout: 5s + retries: 3 + start_period: 10s + networks: + - net diff --git a/scripts/config.sh b/scripts/config.sh index 024ff61..fcd8e83 100644 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -56,6 +56,7 @@ function set_port() { razor_enable=$(get_config RAZOR_ENABLE) web_enable=$(get_config WEB_ENABLE) nec_enable=$(get_config NEC_ENABLE) + facelive_enable=$(get_config FACELIVE_ENABLE) if [[ "${web_enable}" != "0" ]]; then http_port=$(get_config HTTP_PORT) diff --git a/scripts/utils.sh b/scripts/utils.sh index 28fca8d..c28b109 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -208,6 +208,7 @@ function get_images() { echo "registry.fit2cloud.com/jumpserver/xrdp:${VERSION}" echo "registry.fit2cloud.com/jumpserver/panda:${VERSION}" echo "registry.fit2cloud.com/jumpserver/nec:${VERSION}" + echo "registry.fit2cloud.com/jumpserver/facelive:${VERSION}" else echo "jumpserver/core:${VERSION}" echo "jumpserver/koko:${VERSION}" @@ -343,8 +344,8 @@ function get_docker_compose_services() { [[ "${use_loki}" == "1" ]] && services+=" loki" if [[ "${use_xpack}" == "1" ]]; then - services+=" magnus razor xrdp video panda nec" - for service in magnus razor xrdp video panda nec; do + services+=" magnus razor xrdp video panda nec facelive" + for service in magnus razor xrdp video panda nec facelive; do enabled=$(get_config "${service^^}_ENABLED") [[ "${enabled}" == "0" ]] && services="${services//${service}/}" done @@ -396,7 +397,7 @@ function get_docker_compose_cmd_line() { fi if [[ "${use_xpack}" == '1' ]]; then - for service in magnus razor xrdp video panda nec; do + for service in magnus razor xrdp video panda nec facelive; do if [[ "${services}" =~ ${service} ]]; then cmd+=" -f compose/${service}.yml" fi