File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,11 +3,12 @@ name: Build and Push Base Image
33on :
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
1213jobs :
1314 build-and-push :
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
Original file line number Diff line number Diff line change 11on :
22 schedule :
3- - cron : ' 0 1 * * *'
3+ - cron : " 0 1 * * *"
44 push :
55 branches :
66 - dev
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
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)
Original file line number Diff line number Diff line change @@ -2,31 +2,36 @@ ARG VERSION=dev
22FROM jumpserver/lina:${VERSION} AS lina
33FROM jumpserver/luna:${VERSION} AS luna
44
5- FROM nginx:1.29 -trixie
5+ FROM nginx:1.31 -trixie
66ARG TARGETARCH
77
8- ARG CHECK_VERSION=v1.0.5
98ARG APT_MIRROR=http://deb.debian.org
109
1110ARG TOOLS=" \
1211 ca-certificates \
1312 wget \
14- curl \
15- vim \
13+ logrotate \
1614 "
1715
1816RUN 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
3136WORKDIR /opt
3237
Original file line number Diff line number Diff line change 11ARG VERSION=dev
2- FROM jumpserver/web-static:20260122_091122 AS static
2+ FROM jumpserver/web-static:20260716_073445 AS static
33FROM jumpserver/web:${VERSION}-ce
44
55COPY --from=static /opt/ /opt/
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ ARG TARGETARCH
33
44WORKDIR /tmp
55COPY . .
6+
67RUN set -ex \
78 && apk add --no-cache bash \
89 && bash ./prepare.sh
Original file line number Diff line number Diff line change 11server {
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;
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change 11location /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;
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ location /private-media/ {
88}
99
1010location /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
2021location ~ ^/(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;
You can’t perform that action at this time.
0 commit comments