Skip to content

Commit

Permalink
Merge pull request #208 from jumpserver/dev
Browse files Browse the repository at this point in the history
feat: 更新 v3.10.0
  • Loading branch information
wojiushixiaobai authored Dec 22, 2023
2 parents d887e05 + d2f2242 commit 93106c3
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 50 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ vi .env
```
```vim
# 版本号可以自己根据项目的版本修改
VERSION=v3.9.3
VERSION=v3.10.0
# 构建参数, 支持 amd64/arm64/loong64
TARGETARCH=amd64
Expand Down
11 changes: 4 additions & 7 deletions allinone/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM jumpserver/redis:7.0-buster as redis
FROM jumpserver/guacd:1.5.3-buster as guacd
FROM jumpserver/web-static:v1.0.1 as static
FROM jumpserver/web-static:v1.0.4 as static
FROM jumpserver/openjdk:17-slim-buster as openjdk
FROM jumpserver/python:3.11-slim-buster as get-core
ARG TARGETARCH
Expand All @@ -22,23 +22,20 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \

WORKDIR /opt

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=$VERSION

RUN set -ex \
&& git clone -b ${VERSION} --depth=1 https://github.com/jumpserver/jumpserver /opt/jumpserver \
&& sed -i "s@VERSION = .*@VERSION = \"${VERSION}\"@g" /opt/jumpserver/apps/jumpserver/const.py \
&& chmod +x /opt/jumpserver/entrypoint.sh \
&& rm -f /opt/jumpserver/Dockerfile /opt/jumpserver/Dockerfile-ee /opt/jumpserver/poetry.lock /opt/jumpserver/pyproject.toml \
&& rm -f /opt/jumpserver/Dockerfile \
&& rm -rf /opt/jumpserver/.git /opt/jumpserver/.github

WORKDIR /opt/jumpserver

RUN set -ex \
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/${VERSION}/core/Dockerfile-ce \
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/${VERSION}/core/Dockerfile-ee \
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/${VERSION}/core/poetry.lock \
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/${VERSION}/core/pyproject.toml \
&& cd utils \
&& bash -ixeu build.sh

Expand Down Expand Up @@ -289,7 +286,7 @@ COPY --from=build-core /opt/py3 /opt/py3
COPY --from=get-core /opt/jumpserver/release/jumpserver /opt/jumpserver
COPY --from=static /opt/download /opt/download

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=${VERSION}
ENV PATH=/opt/py3/bin:$PATH

Expand Down
6 changes: 3 additions & 3 deletions allinone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ docker run --name jms_all -d \
-v /opt/jumpserver/kael/data:/opt/kael/data \
-v /opt/jumpserver/chen/data:/opt/chen/data \
-v /opt/jumpserver/web/log:/var/log/nginx \
jumpserver/jms_all:v3.9.3
jumpserver/jms_all:v3.10.0
```

**升级**
Expand All @@ -118,7 +118,7 @@ mysqldump -h$DB_HOST -p$DB_PORT -u$DB_USER -p$DB_PASSWORD $DB_NAME > /opt/jumpse
# 例: mysqldump -h192.168.100.11 -p3306 -ujumpserver -pnu4x599Wq7u0Bn8EABh3J91G jumpserver > /opt/jumpserver-v2.12.0.sql

# 拉取新版本镜像
docker pull jumpserver/jms_all:v3.9.3
docker pull jumpserver/jms_all:v3.10.0

# 删掉旧版本容器
docker rm jms_all
Expand Down Expand Up @@ -147,4 +147,4 @@ docker run --name jms_all -d \
-v /opt/jumpserver/kael/data:/opt/kael/data \
-v /opt/jumpserver/chen/data:/opt/chen/data \
-v /opt/jumpserver/web/log:/var/log/nginx \
jumpserver/jms_all:v3.9.3
jumpserver/jms_all:v3.10.0
23 changes: 7 additions & 16 deletions allinone/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,14 @@ http {
listen 80;
server_name _;

proxy_cache cache;
proxy_cache_key $host$request_uri;
proxy_cache_methods GET HEAD;
proxy_cache_valid 200 302 720m;
proxy_cache_valid 404 1m;
proxy_cache_use_stale http_502;
proxy_set_header X-Real-IP $remote_addr;
add_header X-Via $server_addr;

client_max_body_size 4096m; # 录像及文件上传大小限制

location = /robots.txt {
default_type text/html;
add_header Content-Type "text/plain; charset=UTF-8";
return 200 "User-agent: *\nDisallow: /\n";
}

location /download/ {
alias /opt/download/;
}
Expand All @@ -63,7 +60,6 @@ http {
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand All @@ -74,7 +70,6 @@ http {
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand All @@ -85,7 +80,6 @@ http {
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand All @@ -96,7 +90,6 @@ http {
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand All @@ -106,13 +99,11 @@ http {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/(core|api|media)/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080;
}
Expand Down
2 changes: 1 addition & 1 deletion allinone/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ The Installation is Complete.
╚█████╔╝╚██████╔╝██║ ╚═╝ ██║██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
╚════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝

VERSION: v3.9.3
VERSION: v3.10.0
2 changes: 1 addition & 1 deletion chen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RUN set -ex \

WORKDIR /opt/chen

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down
2 changes: 1 addition & 1 deletion config_example.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 版本号可以自己根据项目的版本修改
VERSION=v3.9.3
VERSION=v3.10.0

# 构建参数, 支持 amd64/arm64/loong64
TARGETARCH=amd64
Expand Down
9 changes: 3 additions & 6 deletions core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,20 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \

WORKDIR /opt

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=$VERSION

RUN set -ex \
&& git clone -b ${VERSION} --depth=1 https://github.com/jumpserver/jumpserver /opt/jumpserver \
&& sed -i "s@VERSION = .*@VERSION = \"${VERSION}\"@g" /opt/jumpserver/apps/jumpserver/const.py \
&& chmod +x /opt/jumpserver/entrypoint.sh \
&& rm -f /opt/jumpserver/Dockerfile /opt/jumpserver/Dockerfile-ee /opt/jumpserver/poetry.lock /opt/jumpserver/pyproject.toml \
&& rm -f /opt/jumpserver/Dockerfile \
&& rm -rf /opt/jumpserver/.git /opt/jumpserver/.github

WORKDIR /opt/jumpserver

RUN set -ex \
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/${VERSION}/core/Dockerfile-ce \
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/${VERSION}/core/Dockerfile-ee \
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/${VERSION}/core/poetry.lock \
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/${VERSION}/core/pyproject.toml \
&& cd utils \
&& bash -ixeu build.sh

Expand Down Expand Up @@ -168,7 +165,7 @@ COPY --from=stage-1 /opt/jumpserver/release/jumpserver /opt/jumpserver

WORKDIR /opt/jumpserver

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=${VERSION}

VOLUME /opt/jumpserver/data
Expand Down
2 changes: 1 addition & 1 deletion kael/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN set -ex \

WORKDIR /opt/kael

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down
2 changes: 1 addition & 1 deletion koko/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ RUN set -ex \

WORKDIR /opt/koko

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down
2 changes: 1 addition & 1 deletion lion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN set -ex \

WORKDIR /opt/lion

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down
2 changes: 1 addition & 1 deletion magnus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN set -ex \

WORKDIR /opt/magnus

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down
4 changes: 2 additions & 2 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jumpserver/web-static:v1.0.1 as static
FROM jumpserver/web-static:v1.0.4 as static
FROM nginx:1.24-buster
ARG TARGETARCH
ENV LANG=zh_CN.UTF-8
Expand Down Expand Up @@ -27,7 +27,7 @@ COPY --from=static /opt/download /opt/download

WORKDIR /opt

ARG VERSION=v3.9.3
ARG VERSION=v3.10.0
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down
14 changes: 6 additions & 8 deletions web/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ http {
proxy_cache_valid 200 302 720m;
proxy_cache_valid 404 1m;
proxy_cache_use_stale http_502;
proxy_set_header X-Real-IP $remote_addr;
add_header X-Via $server_addr;

client_max_body_size 4096m; # 录像及文件上传大小限制

location = /robots.txt {
default_type text/html;
add_header Content-Type "text/plain; charset=UTF-8";
return 200 "User-agent: *\nDisallow: /\n";
}

location /download/ {
alias /opt/download/;
}
Expand All @@ -63,7 +67,6 @@ http {
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand All @@ -74,7 +77,6 @@ http {
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand All @@ -85,7 +87,6 @@ http {
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand All @@ -96,7 +97,6 @@ http {
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand All @@ -106,12 +106,10 @@ http {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/(core|api|media)/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://core:8080;
Expand Down

0 comments on commit 93106c3

Please sign in to comment.