Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/jumpserver/docker-web into p…
Browse files Browse the repository at this point in the history
…r@dev@perf_applet
  • Loading branch information
wojiushixiaobai committed Oct 18, 2024
2 parents 4ff0fda + f669d41 commit 4edb80d
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 17 deletions.
33 changes: 29 additions & 4 deletions .github/workflows/check-deps-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,34 @@ jobs:
with:
ref: ${{ matrix.branch }}

- name: Set up Git
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Fetch all branches
run: git fetch --all

- name: Check if branch exists
id: check_branch
run: |
BRANCH_EXISTS=$(git ls-remote --heads origin pr@${{ matrix.branch }}@upgrade_client)
if [ -n "$BRANCH_EXISTS" ]; then
echo "Branch exists, checking it out."
echo "branch_exists=true" >> $GITHUB_ENV
else
echo "Branch does not exist, will create new one."
echo "branch_exists=false" >> $GITHUB_ENV
fi
- name: Checkout existing branch or create new one
run: |
if [ "$branch_exists" == "true" ]; then
git checkout pr@${{ matrix.branch }}@upgrade_client
else
git checkout -b pr@${{ matrix.branch }}@upgrade_client
fi
- name: Check client version
run: |
version=$(curl -s https://api.github.com/repos/jumpserver/clients/releases/latest | jq -r .tag_name)
Expand Down Expand Up @@ -48,9 +76,6 @@ jobs:
- name: Update Client Version
if: env.need_update == '1'
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git checkout -b pr@${{ matrix.branch }}@upgrade_client
git add .
git commit -m "Update pkg versions"
git push origin pr@${{ matrix.branch }}@upgrade_client
git push origin
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VERSION
ARG VERSION=dev
FROM jumpserver/lina:${VERSION} AS lina
FROM jumpserver/luna:${VERSION} AS luna

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-ee
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG VERSION=dev
FROM jumpserver/web-static:20241010_040353 AS static
FROM jumpserver/web-static:20241012_082502 AS static
FROM jumpserver/web:${VERSION}-ce

COPY --from=static /opt/ /opt/
8 changes: 7 additions & 1 deletion default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ server {

client_max_body_size 5000m;

# For wecom verify
location ~* ^/WW_verify_[^.]+\.txt$ {
root /opt/jumpserver/data/;
}

# For acme challenge
location /.well-known/ {
root /opt/jumpserver/data/;
}

location = /robots.txt {
default_type text/html;
add_header Content-Type "text/plain; charset=UTF-8";
Expand Down Expand Up @@ -41,7 +47,7 @@ server {
}

location @redirect_oss {
rewrite ^/download/(.*)$ https://static.jumpserver.org/download/$1 permanent;
rewrite ^/download/(.*)$ http://static.jumpserver.org/download/$1 permanent;
}

location / {
Expand Down
2 changes: 1 addition & 1 deletion http_server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ server {
proxy_read_timeout 600;
send_timeout 6000;
}
}
}
5 changes: 5 additions & 0 deletions includes/core.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ location ~ ^/(core|api|media)/ {
proxy_pass http://core:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ignore_client_abort on;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 6000;
}
20 changes: 12 additions & 8 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,28 +110,32 @@ function config_https() {
fi
}

function safe_move() {
if [ -f "$1" ]; then
mv "$1" "$2"
fi
}

# config components
function config_components() {
if [ "${CORE_ENABLED}" == "0" ]; then
mv /etc/nginx/includes/core.conf /etc/nginx/includes/core.conf.disabled
safe_move /etc/nginx/includes/core.conf /etc/nginx/includes/core.conf.disabled
fi

if [ "${KOKO_ENABLED}" == "0" ]; then
mv /etc/nginx/includes/koko.conf /etc/nginx/includes/koko.conf.disabled
safe_move /etc/nginx/includes/koko.conf /etc/nginx/includes/koko.conf.disabled
fi

if [ "${LION_ENABLED}" == "0" ]; then
mv /etc/nginx/includes/lion.conf /etc/nginx/includes/lion.conf.disabled
safe_move /etc/nginx/includes/lion.conf /etc/nginx/includes/lion.conf.disabled
fi

if [ "${CHEN_ENABLED}" == "0" ]; then
mv /etc/nginx/includes/chen.conf /etc/nginx/includes/chen.conf.disabled
safe_move /etc/nginx/includes/chen.conf /etc/nginx/includes/chen.conf.disabled
fi

if [ "${USE_XPACK}" == "1" ]; then
if [ "${RAZOR_ENABLED}" != "0" ]; then
mv /etc/nginx/includes/razor.conf.disabled /etc/nginx/includes/razor.conf
fi
if [[ "${USE_XPACK}" == "1" && "${RAZOR_ENABLED}" != "0" ]]; then
safe_move /etc/nginx/includes/razor.conf.disabled /etc/nginx/includes/razor.conf
fi
}

Expand Down
3 changes: 3 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ http {
keepalive_timeout 65;

gzip on;
gzip_min_length 1k;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_vary on;
server_tokens off;

include /etc/nginx/conf.d/*.conf;
Expand Down
2 changes: 1 addition & 1 deletion versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ DBEAVER_VERSION=22.3.4
MRD_VERSION=10.6.7
OPENSSH_VERSION=v9.4.0.0
MONGOSH_VERSION=2.2.12
TINKER_VERSION=v0.1.7
TINKER_VERSION=v0.1.9
VIDEO_PLAYER_VERSION=0.1.9
CLIENT_VERSION=v2.1.3

0 comments on commit 4edb80d

Please sign in to comment.