Skip to content

Commit

Permalink
Merge pull request #500 from jumpserver/dev
Browse files Browse the repository at this point in the history
v4.4.0
  • Loading branch information
BaiJiangJie authored Nov 21, 2024
2 parents 9dfdfad + 9c3085b commit c1facd8
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 9 deletions.
2 changes: 1 addition & 1 deletion compose/es.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.16
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.25
container_name: jms_es
hostname: jms_es
restart: always
Expand Down
18 changes: 18 additions & 0 deletions compose/facelive.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion compose/minio.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
minio:
image: jumpserver/minio:latest
image: minio/minio:latest
container_name: jms_minio
hostname: jms_minio
restart: always
Expand All @@ -9,6 +9,7 @@ services:
TZ: ${TZ:-Asia/Shanghai}
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: $BOOTSTRAP_TOKEN
MINIO_REGION_NAME: us-west-rack2
ports:
- 9000:9000
- 9001:9001
Expand Down
23 changes: 23 additions & 0 deletions compose/nec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
services:
nec:
image: ${REGISTRY:-registry.fit2cloud.com}/jumpserver/nec:${VERSION}
container_name: jms_nec
hostname: jms_nec
ulimits:
core: 0
restart: always
env_file:
- ${CONFIG_FILE}
ports:
- ${NEC_VNC_PORT:-15900}:15900
volumes:
- ${CONFIG_DIR}/certs:/opt/nec/data/certs
- ${VOLUME_DIR}/nec/data:/opt/nec/data
healthcheck:
test: "curl -fsL http://localhost:8085/nec/health/ > /dev/null"
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
networks:
- net
2 changes: 1 addition & 1 deletion scripts/5_db_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function main() {

db_images=$(get_db_images)

if ! docker ps | grep jms_&>/dev/null; then
if ! docker ps | grep -w "jms_core" &>/dev/null; then
create_db_ops_env
flag=1
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/6_db_restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function main() {

echo "$(gettext 'Start restoring database'): $DB_FILE"

if ! docker ps | grep jms_&>/dev/null; then
if ! docker ps | grep -w "jms_core" &>/dev/null; then
create_db_ops_env
flag=1
fi
Expand Down
9 changes: 8 additions & 1 deletion scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ function set_port() {
xrdp_enable=$(get_config XRDP_ENABLE)
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)
Expand Down Expand Up @@ -105,6 +107,11 @@ function set_port() {
read_from_input magnus_oracle_ports "$(gettext 'Please enter MAGNUS ORACLE PORTS')" "" "${magnus_oracle_ports}"
set_config MAGNUS_ORACLE_PORTS "${magnus_oracle_ports}"
fi
if [[ "${nec_enable}" != "0" ]]; then
nec_vnc_port=$(get_config NEC_VNC_PORT)
read_from_input nec_port "$(gettext 'Please enter NEC VNC PORT')" "" "${nec_vnc_port}"
set_config NEC_VNC_PORT "${nec_vnc_port}"
fi
fi
flag=1
}
Expand Down Expand Up @@ -234,4 +241,4 @@ fi

if [[ "${flag}" == "1" ]]; then
restart_service
fi
fi
10 changes: 6 additions & 4 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function get_db_info() {
if [[ "${check_volume_dir}" == "0" ]]; then
db_engine=$(get_config DB_ENGINE "postgresql")
fi

mysql_data_exists="0"
mariadb_data_exists="0"
postgres_data_exists="0"
Expand Down Expand Up @@ -207,6 +207,8 @@ function get_images() {
echo "registry.fit2cloud.com/jumpserver/video-worker:${VERSION}"
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}"
Expand Down Expand Up @@ -342,8 +344,8 @@ function get_docker_compose_services() {
[[ "${use_loki}" == "1" ]] && services+=" loki"

if [[ "${use_xpack}" == "1" ]]; then
services+=" magnus razor xrdp video panda"
for service in magnus razor xrdp video panda; 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
Expand Down Expand Up @@ -395,7 +397,7 @@ function get_docker_compose_cmd_line() {
fi

if [[ "${use_xpack}" == '1' ]]; then
for service in magnus razor xrdp video panda; do
for service in magnus razor xrdp video panda nec facelive; do
if [[ "${services}" =~ ${service} ]]; then
cmd+=" -f compose/${service}.yml"
fi
Expand Down

0 comments on commit c1facd8

Please sign in to comment.