Skip to content

Commit ccbf83f

Browse files
authored
Merge pull request #322 from jumpserver/dev
v4.10.17-lts
2 parents beda3f2 + 4ff1512 commit ccbf83f

17 files changed

Lines changed: 106 additions & 118 deletions

.github/workflows/build-static-image.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ name: Build and Push Base Image
33
on:
44
push:
55
branches:
6-
- 'pr*'
6+
- "pr*"
7+
- "osm"
78
paths:
8-
- 'versions.txt'
9-
- 'prepare.sh'
10-
- 'Dockerfile-static'
9+
- "versions.txt"
10+
- "prepare.sh"
11+
- "Dockerfile-static"
1112

1213
jobs:
1314
build-and-push:
@@ -44,6 +45,7 @@ jobs:
4445
push: true
4546
tags: jumpserver/web-static:${{ env.IMAGE_TAG }}
4647
file: Dockerfile-static
48+
context: .
4749

4850
- name: Get current branch name
4951
id: get_branch

.github/workflows/check-deps-versions.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
schedule:
3-
- cron: '0 1 * * *'
3+
- cron: "0 1 * * *"
44
push:
55
branches:
66
- dev
@@ -40,7 +40,7 @@ jobs:
4040
echo "Branch does not exist, will create new one."
4141
echo "branch_exists=false" >> $GITHUB_ENV
4242
fi
43-
43+
4444
- name: Checkout existing branch or create new one
4545
run: |
4646
if [ "$branch_exists" == "true" ]; then
@@ -54,12 +54,6 @@ jobs:
5454
version=$(curl -s https://api.github.com/repos/jumpserver/clients/releases/latest | jq -r .tag_name)
5555
sed -i "s/Client_VERSION=.*/Client_VERSION=${version}/g" versions.txt
5656
57-
- name: Check player version
58-
run: |
59-
version=$(curl -s https://api.github.com/repos/jumpserver/VideoPlayer/releases/latest | jq -r .tag_name | sed 's/v//')
60-
echo "version=${version}" >> $GITHUB_ENV
61-
sed -i "s/VIDEO_PLAYER_VERSION=.*/VIDEO_PLAYER_VERSION=${version}/g" versions.txt
62-
6357
- name: Check tinker version
6458
run: |
6559
version=$(curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/jumpserver/tinker/releases/latest | jq -r .tag_name)

Dockerfile

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,36 @@ ARG VERSION=dev
22
FROM jumpserver/lina:${VERSION} AS lina
33
FROM jumpserver/luna:${VERSION} AS luna
44

5-
FROM nginx:1.29-trixie
5+
FROM nginx:1.31-trixie
66
ARG TARGETARCH
77

8-
ARG CHECK_VERSION=v1.0.5
98
ARG APT_MIRROR=http://deb.debian.org
109

1110
ARG TOOLS=" \
1211
ca-certificates \
1312
wget \
14-
curl \
15-
vim \
13+
logrotate \
1614
"
1715

1816
RUN set -ex \
1917
&& rm -f /etc/apt/apt.conf.d/docker-clean \
2018
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list.d/debian.sources\
2119
&& apt-get update > /dev/null \
20+
&& apt-get -y upgrade \
2221
&& apt-get -y install --no-install-recommends ${TOOLS} \
22+
&& wget https://github.com/jumpserver-dev/healthcheck/releases/latest/download/check_linux_${TARGETARCH}.deb \
23+
&& dpkg -i check_linux_${TARGETARCH}.deb \
24+
&& apt-get purge -y wget \
25+
curl \
26+
nginx-module-xslt \
27+
nginx-module-njs \
28+
libxml2 \
29+
libxslt1.1 \
30+
libgd3 \
31+
&& apt-get -y autoremove \
2332
&& apt-get clean \
24-
&& wget https://github.com/jumpserver-dev/healthcheck/releases/download/${CHECK_VERSION}/check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
25-
&& tar -xf check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
26-
&& mv check /usr/local/bin/ \
27-
&& chown root:root /usr/local/bin/check \
28-
&& chmod 755 /usr/local/bin/check \
29-
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz
33+
&& rm -f check_linux_${TARGETARCH}.deb \
34+
&& rm -f /etc/nginx/conf.d/default.conf
3035

3136
WORKDIR /opt
3237

Dockerfile-ee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG VERSION=dev
2-
FROM jumpserver/web-static:20260122_091122 AS static
2+
FROM jumpserver/web-static:20260716_073445 AS static
33
FROM jumpserver/web:${VERSION}-ce
44

55
COPY --from=static /opt/ /opt/

Dockerfile-static

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ARG TARGETARCH
33

44
WORKDIR /tmp
55
COPY . .
6+
67
RUN set -ex \
78
&& apk add --no-cache bash \
89
&& bash ./prepare.sh

default.conf

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,8 @@
11
server {
2-
listen 51980;
2+
listen 51980; # 如果不开启 https, 这里会 sed 成 80
33
# listen [::]:51980;
44

5-
client_max_body_size 5000m;
6-
7-
# For wecom verify
8-
location ~* ^/WW_verify_[^.]+\.txt$ {
9-
root /opt/jumpserver/data/;
10-
}
11-
12-
# For acme challenge
13-
location /.well-known/ {
14-
root /opt/jumpserver/data/;
15-
}
16-
17-
location = /robots.txt {
18-
default_type text/html;
19-
add_header Content-Type "text/plain; charset=UTF-8";
20-
return 200 "User-agent: *\nDisallow: /\n";
21-
}
22-
23-
location /web/health/ {
24-
access_log off;
25-
add_header Content-Type 'application/json';
26-
return 200 '{"status": "ok"}';
27-
}
28-
29-
location /player/ {
30-
try_files $uri / /index.html;
31-
alias /opt/player/;
32-
}
33-
34-
location /ui/ {
35-
try_files $uri / /index.html;
36-
alias /opt/lina/;
37-
}
38-
39-
location /luna/ {
40-
try_files $uri / /index.html;
41-
alias /opt/luna/;
42-
}
43-
44-
location /download/ {
45-
alias /opt/download/;
46-
try_files $uri @redirect_oss;
47-
}
48-
49-
location @redirect_oss {
50-
rewrite ^/download/(.*)$ https://static.jumpserver.org/download/$1 permanent;
51-
}
5+
client_max_body_size 4096m;
526

537
location / {
548
rewrite ^/(.*)$ /ui/$1 last;

http_server.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ server {
1919
proxy_send_timeout 600;
2020
proxy_read_timeout 600;
2121
send_timeout 6000;
22-
}
23-
}
22+
}
23+
}

includes/chen.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
location /chen/ {
2-
proxy_pass http://chen:8082;
2+
set $chen_upstream chen:8082;
3+
proxy_pass http://$chen_upstream;
34
proxy_buffering off;
45
proxy_http_version 1.1;
56
proxy_request_buffering off;

includes/common.conf

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# For wecom verify
3+
location ~* ^/WW_verify_[^.]+\.txt$ {
4+
root /opt/jumpserver/data/;
5+
}
6+
7+
# For acme challenge
8+
location /.well-known/ {
9+
root /opt/jumpserver/data/;
10+
}
11+
12+
location = /robots.txt {
13+
default_type text/html;
14+
add_header Content-Type "text/plain; charset=UTF-8";
15+
return 200 "User-agent: *\nDisallow: /\n";
16+
}
17+
18+
location /web/health/ {
19+
access_log off;
20+
default_type application/json;
21+
return 200 '{"status": "ok"}';
22+
}
23+
24+
location /player/ {
25+
try_files $uri / /index.html;
26+
alias /opt/player/;
27+
}
28+
29+
location /ui/ {
30+
try_files $uri / /index.html;
31+
alias /opt/lina/;
32+
}
33+
34+
location /luna/ {
35+
try_files $uri / /index.html;
36+
alias /opt/luna/;
37+
}
38+
39+
location /download/ {
40+
alias /opt/download/;
41+
try_files $uri @redirect_oss;
42+
}
43+
44+
location @redirect_oss {
45+
rewrite ^/download/(.*)$ https://static.jumpserver.org/download/$1?v=osm;
46+
}

includes/core.conf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ location /private-media/ {
88
}
99

1010
location /ws/ {
11-
proxy_pass http://core:8080;
11+
set $core_upstream core:8080;
12+
proxy_pass http://$core_upstream;
1213
proxy_buffering off;
1314
proxy_http_version 1.1;
1415
proxy_set_header Upgrade $http_upgrade;
@@ -18,7 +19,8 @@ location /ws/ {
1819
}
1920

2021
location ~ ^/(core|api|media)/ {
21-
proxy_pass http://core:8080;
22+
set $core_upstream core:8080;
23+
proxy_pass http://$core_upstream;
2224
proxy_set_header Host $http_host;
2325
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2426
proxy_ignore_client_abort on;

0 commit comments

Comments
 (0)