From 79efffa09de08f919ad70ca2af3b58857cb4d1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Thu, 4 Jul 2024 22:28:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=B4=E6=97=B6=E4=BF=AE=E5=A4=8D=20l?= =?UTF-8?q?dap=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 ++++++++++++---- README_EN.md | 16 +++++++++++----- allinone/Dockerfile | 1 - allinone/README.md | 10 +++++++--- allinone/docker-compose.yml | 1 - allinone/nginx.conf | 10 ---------- allinone/supervisord.conf | 11 ----------- config_example.conf | 3 +++ core/Dockerfile | 7 ++++--- web/nginx.conf | 10 ---------- 10 files changed, 37 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 17249d0..62dd5e8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ git clone --depth=1 https://github.com/jumpserver/Dockerfile.git cd Dockerfile cp config_example.conf .env -docker compose -f docker-compose-network.yml -f docker-compose-redis.yml -f docker-compose-mariadb.yml -f docker-compose-init-db.yml up -d +docker compose -f docker-compose-network.yml -f docker-compose-redis.yml -f docker-compose-mariadb.yml -f docker-compose-init-db.yml up docker compose -f docker-compose-network.yml -f docker-compose-redis.yml -f docker-compose-mariadb.yml -f docker-compose.yml up -d docker rm jms_init_db @@ -93,6 +93,9 @@ BOOTSTRAP_TOKEN=7Q11Vz6R2J6BLAdO LOG_LEVEL=ERROR DOMAINS= +# 组件通信 +CORE_HOST=http://core:8080 + # Lion GUA_HOST=guacd GUA_PORT=4822 @@ -106,7 +109,7 @@ SSH_PORT=2222 # BOOTSTRAP_TOKEN 为组件认证使用的密钥, 仅组件注册时使用。组件指 koko, lion, magnus, kael, chen ... ``` ```sh -docker compose -f docker-compose-network.yml -f docker-compose-init-db.yml up -d +docker compose -f docker-compose-network.yml -f docker-compose-init-db.yml up docker compose -f docker-compose-network.yml -f docker-compose.yml up -d docker rm jms_init_db @@ -124,10 +127,8 @@ docker rm jms_init_db mkdir -p /data/jumpserver/core/data mkdir -p /data/jumpserver/chen/data mkdir -p /data/jumpserver/lion/data -mkdir -p /data/jumpserver/kael/data mkdir -p /data/jumpserver/koko/data mkdir -p /data/jumpserver/lion/data -mkdir -p /data/jumpserver/magnus/data mkdir -p /data/jumpserver/web/data/logs mkdir -p /data/jumpserver/web/download ``` @@ -175,6 +176,9 @@ BOOTSTRAP_TOKEN=7Q11Vz6R2J6BLAdO LOG_LEVEL=ERROR DOMAINS= +# 组件通信 +CORE_HOST=http://core:8080 + # Lion GUA_HOST=guacd GUA_PORT=4822 @@ -226,3 +230,7 @@ TARGETARCH=amd64 ```bash docker compose -f docker-compose-build.yml up ``` + +## 初始账号 +- 默认账号: `admin` +- 默认密码: `ChangeMe` \ No newline at end of file diff --git a/README_EN.md b/README_EN.md index 282cc00..e2b4a10 100644 --- a/README_EN.md +++ b/README_EN.md @@ -22,7 +22,7 @@ git clone --depth=1 https://github.com/jumpserver/Dockerfile.git cd Dockerfile cp config_example.conf .env -docker compose -f docker-compose-network.yml -f docker-compose-redis.yml -f docker-compose-mariadb.yml -f docker-compose-init-db.yml up -d +docker compose -f docker-compose-network.yml -f docker-compose-redis.yml -f docker-compose-mariadb.yml -f docker-compose-init-db.yml up docker compose -f docker-compose-network.yml -f docker-compose-redis.yml -f docker-compose-mariadb.yml -f docker-compose.yml up -d docker rm jms_init_db @@ -93,6 +93,8 @@ BOOTSTRAP_TOKEN=7Q11Vz6R2J6BLAdO LOG_LEVEL=ERROR DOMAINS= +CORE_HOST=http://core:8080 + # Lion GUA_HOST=guacd GUA_PORT=4822 @@ -106,7 +108,7 @@ SSH_PORT=2222 # BOOTSTRAP_TOKEN is the key used for component authentication, only used when the component is registered. The components refer to koko, lion, magnus, kael, chen ... ``` ```sh -docker compose -f docker-compose-network.yml -f docker-compose-init-db.yml up -d +docker compose -f docker-compose-network.yml -f docker-compose-init-db.yml up docker compose -f docker-compose-network.yml -f docker-compose.yml up -d docker rm jms_init_db @@ -124,10 +126,8 @@ docker rm jms_init_db mkdir -p /data/jumpserver/core/data mkdir -p /data/jumpserver/chen/data mkdir -p /data/jumpserver/lion/data -mkdir -p /data/jumpserver/kael/data mkdir -p /data/jumpserver/koko/data mkdir -p /data/jumpserver/lion/data -mkdir -p /data/jumpserver/magnus/data mkdir -p /data/jumpserver/web/data/logs mkdir -p /data/jumpserver/web/download ``` @@ -175,6 +175,8 @@ BOOTSTRAP_TOKEN=7Q11Vz6R2J6BLAdO LOG_LEVEL=ERROR DOMAINS= +CORE_HOST=http://core:8080 + # Lion GUA_HOST=guacd GUA_PORT=4822 @@ -219,4 +221,8 @@ TARGETARCH=amd64 ``` ```sh docker compose -f docker-compose-build.yml up -``` \ No newline at end of file +``` + +## Initial Account +- Default username: `admin` +- Default password: `ChangeMe` \ No newline at end of file diff --git a/allinone/Dockerfile b/allinone/Dockerfile index 7f14738..5ee2c6e 100644 --- a/allinone/Dockerfile +++ b/allinone/Dockerfile @@ -116,7 +116,6 @@ RUN chmod +x ./entrypoint.sh VOLUME /opt/jumpserver/data VOLUME /opt/koko/data VOLUME /opt/lion/data -VOLUME /opt/kael/data VOLUME /opt/chen/data VOLUME /opt/download VOLUME /var/log/nginx diff --git a/allinone/README.md b/allinone/README.md index a39fa3f..20d54fd 100644 --- a/allinone/README.md +++ b/allinone/README.md @@ -58,7 +58,6 @@ flush privileges; - VOLUME /opt/jumpserver/data # Core 持久化目录, 存储录像日志 - VOLUME /opt/koko/data # Koko 持久化目录 - VOLUME /opt/lion/data # Lion 持久化目录 - - VOLUME /opt/kael/data # Kael 持久化目录 - VOLUME /opt/chen/data # Chen 持久化目录 - VOLUME /var/log/nginx # Nginx 日志持久化目录 - VOLUME /opt/download # APPLETS 文件持久化目录 (应用发布机所需文件) @@ -89,7 +88,6 @@ docker run --name jms_all -d \ -v /opt/jumpserver/core/data:/opt/jumpserver/data \ -v /opt/jumpserver/koko/data:/opt/koko/data \ -v /opt/jumpserver/lion/data:/opt/lion/data \ - -v /opt/jumpserver/kael/data:/opt/kael/data \ -v /opt/jumpserver/chen/data:/opt/chen/data \ -v /opt/jumpserver/web/data/logs:/var/log/nginx \ -v /opt/jumpserver/web/data/download:/opt/download \ @@ -134,8 +132,14 @@ docker run --name jms_all -d \ -v /opt/jumpserver/core/data:/opt/jumpserver/data \ -v /opt/jumpserver/koko/data:/opt/koko/data \ -v /opt/jumpserver/lion/data:/opt/lion/data \ - -v /opt/jumpserver/kael/data:/opt/kael/data \ -v /opt/jumpserver/chen/data:/opt/chen/data \ -v /opt/jumpserver/web/data/logs:/var/log/nginx \ -v /opt/jumpserver/web/data/download:/opt/download \ jumpserver/jms_all:v4.0.0 +``` + +**初始账号** +```bash +默认账号: admin +默认密码: ChangeMe +``` \ No newline at end of file diff --git a/allinone/docker-compose.yml b/allinone/docker-compose.yml index 48cc114..6e4dd1b 100644 --- a/allinone/docker-compose.yml +++ b/allinone/docker-compose.yml @@ -76,7 +76,6 @@ services: - ${VOLUME_DIR:-./data}/koko/data:/opt/koko/data - ${VOLUME_DIR:-./data}/lion/data:/opt/lion/data - ${VOLUME_DIR:-./data}/chen/data:/opt/chen/data - - ${VOLUME_DIR:-./data}/kael/data:/opt/kael/data - ${VOLUME_DIR:-./data}/web/data/logs:/var/log/nginx - ${VOLUME_DIR:-./data}/web/data/download:/opt/download networks: diff --git a/allinone/nginx.conf b/allinone/nginx.conf index 86fa878..ac57651 100644 --- a/allinone/nginx.conf +++ b/allinone/nginx.conf @@ -93,16 +93,6 @@ http { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - location /kael/ { - proxy_pass http://127.0.0.1:8083; - proxy_buffering off; - proxy_http_version 1.1; - proxy_request_buffering off; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } location /ws/ { proxy_pass http://127.0.0.1:8080; proxy_buffering off; diff --git a/allinone/supervisord.conf b/allinone/supervisord.conf index 3a68b4d..e4048bb 100644 --- a/allinone/supervisord.conf +++ b/allinone/supervisord.conf @@ -44,17 +44,6 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 autorestart=true -[program:kael] -priority=100 -environment=WORK_DIR="/opt/kael",COMPONENT_NAME="kael",WISP_TRACE_PROCESS=1,EXECUTE_PROGRAM="/opt/kael/kael",BIND_PORT=9091,WISP_PORT=9091,LANG=en_US.UTF-8 -directory=/opt/kael/ -command=/usr/local/bin/wisp -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -autorestart=true - [program:chen] priority=100 environment=WORK_DIR="/opt/chen",COMPONENT_NAME="chen",WISP_TRACE_PROCESS=1,EXECUTE_PROGRAM="java -Dfile.encoding=utf-8 -XX:+ExitOnOutOfMemoryError -jar /opt/chen/chen.jar --mock.enable=false",BIND_PORT=9092,LANG=en_US.UTF-8 diff --git a/config_example.conf b/config_example.conf index 734d640..5057c3f 100644 --- a/config_example.conf +++ b/config_example.conf @@ -36,6 +36,9 @@ BOOTSTRAP_TOKEN=7Q11Vz6R2J6BLAdO LOG_LEVEL=ERROR DOMAINS= +# 组件通信 +CORE_HOST=http://core:8080 + # Lion GUA_HOST=guacd GUA_PORT=4822 diff --git a/core/Dockerfile b/core/Dockerfile index d54da23..f001d0e 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -4,6 +4,7 @@ ARG TARGETARCH ARG DEPENDENCIES=" \ ca-certificates \ git \ + git-lfs \ wget" RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ @@ -42,7 +43,7 @@ RUN set -e \ && chmod +x /opt/jumpserver/entrypoint.sh \ && rm -rf /opt/jumpserver/.git /opt/jumpserver/.github -FROM python:3.11-slim-bullseye as stage-2 +FROM python:3.11-slim-bookworm as stage-2 ARG TARGETARCH ARG BUILD_DEPENDENCIES=" \ @@ -66,7 +67,6 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ && apt-get update \ && apt-get -y install --no-install-recommends ${BUILD_DEPENDENCIES} \ && apt-get -y install --no-install-recommends ${DEPENDENCIES} \ - && apt-get -y install --no-install-recommends ${TOOLS} \ && echo "no" | dpkg-reconfigure dash WORKDIR /opt @@ -77,7 +77,8 @@ ENV PYTHONUNBUFFERED=1 \ RUN --mount=type=cache,target=/root/.cache,sharing=locked \ set -e \ - && pip install poetry + && pip install poetry \ + && poetry config virtualenvs.create false WORKDIR /opt/jumpserver diff --git a/web/nginx.conf b/web/nginx.conf index 1ec92c3..da808d2 100644 --- a/web/nginx.conf +++ b/web/nginx.conf @@ -100,16 +100,6 @@ http { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - location /kael/ { - proxy_pass http://kael:8083; - proxy_buffering off; - proxy_http_version 1.1; - proxy_request_buffering off; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } location /ws/ { proxy_pass http://core:8080; proxy_buffering off;