Skip to content

Commit ad86c20

Browse files
LukeGuskientt137ssongjunu송준우SlimGary
authored
v1.10.0 (#471)
* fix select edit host but not update view (#438) * fix: Checksum issue with chocolatey * fix: Remove homebrew old stuff * Add Korean translation (#439) Co-authored-by: 송준우 <2484@coreit.co.kr> * feat: Automate flatpak * fix: Add imagemagik to electron builder to resolve build error * fix: Build error with runtime repo flag * fix: Flatpak runtime error and install freedesktop ver warning * fix: Flatpak runtime error and install freedesktop ver warning * feat: Re-add homebrew cask and move scripts to backend * fix: No sandbox flag issue * fix: Change name for electron macos cask output * fix: Sandbox error with Linux * fix: Remove comming soon for app stores in readme * Adding Comment at the end of the public_key on the host on deploy (#440) * Add termix.rb Cask file * Update Termix to version 1.9.0 with new checksum * Update README to remove 'coming soon' notes * -Add New Interface for Credential DB -Add Credential Name as a comment into the server authorized_key file --------- Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> * Sudo auto fill password (#441) * Add termix.rb Cask file * Update Termix to version 1.9.0 with new checksum * Update README to remove 'coming soon' notes * Feature Sudo password auto-fill; * Fix locale json shema; --------- Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> * Added Italian Language; (#445) * Add termix.rb Cask file * Update Termix to version 1.9.0 with new checksum * Update README to remove 'coming soon' notes * Added Italian Language; --------- Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> * Auto collapse snippet folders (#448) * Add termix.rb Cask file * Update Termix to version 1.9.0 with new checksum * Update README to remove 'coming soon' notes * feat: Add collapsable snippets (customizable in user profile) * Translations (#447) * Add termix.rb Cask file * Update Termix to version 1.9.0 with new checksum * Update README to remove 'coming soon' notes * Added Italian Language; * Fix translations; Removed duplicate keys, synchronised other languages using English as the source, translated added keys, fixed inaccurate translations. --------- Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> * Remove PTY-level keepalive (#449) * Add termix.rb Cask file * Update Termix to version 1.9.0 with new checksum * Update README to remove 'coming soon' notes * Remove PTY-level keepalive to prevent unwanted terminal output; use SSH-level keepalive instead --------- Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> * feat: Seperate server stats and tunnel management (improved both UI's) then started initial docker implementation * fix: finalize adding docker to db * feat: Add docker management support (local squash) * Fix RBAC role system bugs and improve UX (#446) * Fix RBAC role system bugs and improve UX - Fix user list dropdown selection in host sharing - Fix role sharing permissions to include role-based access - Fix translation template interpolation for success messages - Standardize system roles to admin and user only - Auto-assign user role to new registrations - Remove blocking confirmation dialogs in modal contexts - Add missing i18n keys for common actions - Fix button type to prevent unintended form submissions * Enhance RBAC system with UI improvements and security fixes - Move role assignment to Users tab with per-user role management - Protect system roles (admin/user) from editing and manual assignment - Simplify permission system: remove Use level, keep View and Manage - Hide Update button and Sharing tab for view-only/shared hosts - Prevent users from sharing hosts with themselves - Unify table and modal styling across admin panels - Auto-assign system roles on user registration - Add permission metadata to host interface * Add empty state message for role assignment - Display helpful message when no custom roles available - Clarify that system roles are auto-assigned - Add noCustomRolesToAssign translation in English and Chinese * fix: Prevent credential sharing errors for shared hosts - Skip credential resolution for shared hosts with credential authentication to prevent decryption errors (credentials are encrypted per-user) - Add warning alert in sharing tab when host uses credential authentication - Inform users that shared users cannot connect to credential-based hosts - Add translations for credential sharing warning (EN/ZH) This prevents authentication failures when sharing hosts configured with credential authentication while maintaining security by keeping credentials isolated per user. * feat: Improve rbac UI and fixes some bugs --------- Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> Co-authored-by: LukeGus <bugattiguy527@gmail.com> * SOCKS5 support (#452) * Add termix.rb Cask file * Update Termix to version 1.9.0 with new checksum * Update README to remove 'coming soon' notes * SOCKS5 support Adding single and chain socks5 proxy support * fix: cleanup files --------- Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> Co-authored-by: LukeGus <bugattiguy527@gmail.com> * Notes and Expiry fields add (#453) * Add termix.rb Cask file * Update Termix to version 1.9.0 with new checksum * Update README to remove 'coming soon' notes * Notes and Expiry add * fix: cleanup files --------- Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> Co-authored-by: LukeGus <bugattiguy527@gmail.com> * fix: ssh host types * fix: sudo incorrect styling and remove expiration date * feat: add sudo password and add diagonal bg's * fix: snippet running on enter key * fix: base64 decoding * fix: improve server stats / rbac * fix: wrap ssh host json export in hosts array * feat: auto trim host inputs, fix file manager jump hosts, dashboard prevent duplicates, file manager terminal not size updating, improve left sidebar sorting, hide/show tags, add apperance user profile tab, add new host manager tabs. * feat: improve terminal connection speed * fix: sqlite constriant errors and support non-root user (nginx perm issue) * feat: add beta syntax highlighing to terminal * feat: update imports and improve admin settings user management * chore: update translations * chore: update translations * feat: Complete light mode implementation with semantic theme system (#450) - Add comprehensive light/dark mode CSS variables with semantic naming - Implement theme-aware scrollbars using CSS variables - Add light mode backgrounds: --bg-base, --bg-elevated, --bg-surface, etc. - Add theme-aware borders: --border-base, --border-panel, --border-subtle - Add semantic text colors: --foreground-secondary, --foreground-subtle - Convert oklch colors to hex for better compatibility - Add theme awareness to CodeMirror editors - Update dark mode colors for consistency (background, sidebar, card, muted, input) - Add Tailwind color mappings for semantic classes Co-authored-by: Luke Gustafson <88517757+LukeGus@users.noreply.github.com> * fix: syntax errors * chore: updating/match themes and split admin settings * feat: add translation workflow and remove old translation.json * fix: translation workflow error * fix: translation workflow error * feat: improve translation system and update workflow * fix: wrong path for translations * fix: change translation to flat files * fix: gh rule error * chore: auto-translate to multiple languages (#458) * chore: improve organization and made a few styling changes in host manager * feat: improve terminal stability and split out the host manager * fix: add unnversiioned files * chore: migrate all to use the new theme system * fix: wrong animation line colors * fix: rbac implementation general issues (local squash) * fix: remove unneeded files * feat: add 10 new langs * chore: update gitnore * chore: auto-translate to multiple languages (#459) * fix: improve tunnel system * fix: properly split tabs, still need to fix up the host manager * chore: cleanup files (possible RC) * feat: add norwegian * chore: auto-translate to multiple languages (#461) * fix: small qol fixes and began readme update * fix: run cleanup script * feat: add docker docs button * feat: general bug fixes and readme updates * fix: translations * chore: auto-translate to multiple languages (#462) * fix: cleanup files * fix: test new translation issue and add better server-stats support * fix: fix translate error * chore: auto-translate to multiple languages (#463) * fix: fix translate mismatching text * chore: auto-translate to multiple languages (#465) * fix: fix translate mismatching text * fix: fix translate mismatching text * chore: auto-translate to multiple languages (#466) * fix: fix translate mismatching text * fix: fix translate mismatching text * fix: fix translate mismatching text * chore: auto-translate to multiple languages (#467) * fix: fix translate mismatching text * chore: auto-translate to multiple languages (#468) * feat: add to readme, a few qol changes, and improve server stats in general * chore: auto-translate to multiple languages (#469) * feat: turned disk uage into graph and fixed issue with termina console * fix: electron build error and hide icons when shared * chore: run clean * fix: general server stats issues, file manager decoding, ui qol * fix: add dashboard line breaks * fix: docker console error * fix: docker console not loading and mismatched stripped background for electron * fix: docker console not loading * chore: docker console not loading in docker * chore: translate readme to chinese * chore: match package lock to package json * chore: nginx config issue for dokcer console * chore: auto-translate to multiple languages (#470) --------- Co-authored-by: Tran Trung Kien <kientt13.7@gmail.com> Co-authored-by: junu <bigdwarf_@naver.com> Co-authored-by: 송준우 <2484@coreit.co.kr> Co-authored-by: SlimGary <trash.slim@gmail.com> Co-authored-by: Nunzio Marfè <nunzio.marfe@protonmail.com> Co-authored-by: Wesley Reid <starhound@lostsouls.org> Co-authored-by: ZacharyZcR <zacharyzcr1984@gmail.com> Co-authored-by: Denis <38875137+Medvedinca@users.noreply.github.com> Co-authored-by: Peet McKinney <68706879+PeetMcK@users.noreply.github.com>
1 parent 7139290 commit ad86c20

225 files changed

Lines changed: 87347 additions & 17697 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/electron.yml

Lines changed: 299 additions & 111 deletions
Large diffs are not rendered by default.

.github/workflows/translate.yml

Lines changed: 424 additions & 15 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ dist-ssr
2828
/.mcp.json
2929
/nul
3030
/.vscode/
31+
/CLAUDE.md

README-CN.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,22 @@ Termix 是一个开源、永久免费、自托管的一体化服务器管理平
5151
- **SSH 终端访问** - 功能齐全的终端,具有分屏支持(最多 4 个面板)和类似浏览器的选项卡系统。包括对自定义终端的支持,包括常见终端主题、字体和其他组件
5252
- **SSH 隧道管理** - 创建和管理 SSH 隧道,具有自动重新连接和健康监控功能
5353
- **远程文件管理器** - 直接在远程服务器上管理文件,支持查看和编辑代码、图像、音频和视频。无缝上传、下载、重命名、删除和移动文件
54+
- **Docker 管理** - 启动、停止、暂停、删除容器。查看容器统计信息。使用 docker exec 终端控制容器。它不是用来替代 Portainer 或 Dockge,而是用于简单管理你的容器而不是创建它们。
5455
- **SSH 主机管理器** - 保存、组织和管理您的 SSH 连接,支持标签和文件夹,并轻松保存可重用的登录信息,同时能够自动部署 SSH 密钥
5556
- **服务器统计** - 在任何 SSH 服务器上查看 CPU、内存和磁盘使用情况以及网络、正常运行时间和系统信息
5657
- **仪表板** - 在仪表板上一目了然地查看服务器信息
58+
- **RBAC** - 创建角色并在用户/角色之间共享主机
5759
- **用户认证** - 安全的用户管理,具有管理员控制以及 OIDC 和 2FA (TOTP) 支持。查看所有平台上的活动用户会话并撤销权限。将您的 OIDC/本地帐户链接在一起。
5860
- **数据库加密** - 后端存储为加密的 SQLite 数据库文件。查看[文档](https://docs.termix.site/security)了解更多信息。
5961
- **数据导出/导入** - 导出和导入 SSH 主机、凭据和文件管理器数据
6062
- **自动 SSL 设置** - 内置 SSL 证书生成和管理,支持 HTTPS 重定向
61-
- **现代用户界面** - 使用 React、Tailwind CSS 和 Shadcn 构建的简洁的桌面/移动设备友好界面
62-
- **语言** - 内置支持英语、中文、德语和葡萄牙语
63+
- **现代用户界面** - 使用 React、Tailwind CSS 和 Shadcn 构建的简洁的桌面/移动设备友好界面。可选择基于深色或浅色模式的用户界面。
64+
- **语言** - 内置支持约 30 种语言(通过 Google 翻译批量翻译,结果可能有所不同)
6365
- **平台支持** - 可作为 Web 应用程序、桌面应用程序(Windows、Linux 和 macOS)以及适用于 iOS 和 Android 的专用移动/平板电脑应用程序。
6466
- **SSH 工具** - 创建可重用的命令片段,单击即可执行。在多个打开的终端上同时运行一个命令。
6567
- **命令历史** - 自动完成并查看以前运行的 SSH 命令
6668
- **命令面板** - 双击左 Shift 键可快速使用键盘访问 SSH 连接
67-
- **SSH 功能丰富** - 支持跳板机、warpgate、基于 TOTP 的连接等
69+
- **SSH 功能丰富** - 支持跳板机、warpgate、基于 TOTP 的连接、SOCKS5、密码自动填充等
6870

6971
# 计划功能
7072

@@ -140,14 +142,20 @@ volumes:
140142

141143
<p align="center">
142144
<img src="./repo-images/Image 7.png" width="400" alt="Termix Demo 7"/>
145+
<img src="./repo-images/Image 8.png" width="400" alt="Termix Demo 8"/>
146+
</p>
147+
148+
<p align="center">
149+
<img src="./repo-images/Image 9.png" width="400" alt="Termix Demo 9"/>
150+
<img src="./repo-images/Image 10.png" width="400" alt="Termix Demo 110"/>
143151
</p>
144152

145153
<p align="center">
146154
<video src="https://github.com/user-attachments/assets/88936e0d-2399-4122-8eee-c255c25da48c" width="800" controls>
147155
你的浏览器不支持 video 标签。
148156
</video>
149157
</p>
150-
视频和图像可能已过时
158+
某些视频和图像可能已过时或可能无法完美展示功能
151159

152160
# 许可证
153161

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,30 @@ If you would like, you can support the project here!\
4545

4646
Termix is an open-source, forever-free, self-hosted all-in-one server management platform. It provides a multi-platform
4747
solution for managing your servers and infrastructure through a single, intuitive interface. Termix offers SSH terminal
48-
access, SSH tunneling capabilities, and remote file management, with many more tools to come. Termix is the perfect
48+
access, SSH tunneling capabilities, remote file management, and many other tools. Termix is the perfect
4949
free and self-hosted alternative to Termius available for all platforms.
5050

5151
# Features
5252

5353
- **SSH Terminal Access** - Full-featured terminal with split-screen support (up to 4 panels) with a browser-like tab system. Includes support for customizing the terminal including common terminal themes, fonts, and other components
5454
- **SSH Tunnel Management** - Create and manage SSH tunnels with automatic reconnection and health monitoring
5555
- **Remote File Manager** - Manage files directly on remote servers with support for viewing and editing code, images, audio, and video. Upload, download, rename, delete, and move files seamlessly
56+
- **Docker Management** - Start, stop, pause, remove containers. View container stats. Control container using docker exec terminal. It was not made to replace Portainer or Dockge but rather to simply manage your containers compared to creating them.
5657
- **SSH Host Manager** - Save, organize, and manage your SSH connections with tags and folders, and easily save reusable login info while being able to automate the deployment of SSH keys
5758
- **Server Stats** - View CPU, memory, and disk usage along with network, uptime, and system information on any SSH server
5859
- **Dashboard** - View server information at a glance on your dashboard
60+
- **RBAC** - Create roles and share hosts across users/roles
5961
- **User Authentication** - Secure user management with admin controls and OIDC and 2FA (TOTP) support. View active user sessions across all platforms and revoke permissions. Link your OIDC/Local accounts together.
6062
- **Database Encryption** - Backend stored as encrypted SQLite database files. View [docs](https://docs.termix.site/security) for more.
6163
- **Data Export/Import** - Export and import SSH hosts, credentials, and file manager data
6264
- **Automatic SSL Setup** - Built-in SSL certificate generation and management with HTTPS redirects
63-
- **Modern UI** - Clean desktop/mobile-friendly interface built with React, Tailwind CSS, and Shadcn
64-
- **Languages** - Built-in support for English, Chinese, German, and Portuguese
65+
- **Modern UI** - Clean desktop/mobile-friendly interface built with React, Tailwind CSS, and Shadcn. Choose between dark or light mode based UI.
66+
- **Languages** - Built-in support ~30 languages (bulk translated via Google Translate, results may vary ofc)
6567
- **Platform Support** - Available as a web app, desktop application (Windows, Linux, and macOS), and dedicated mobile/tablet app for iOS and Android.
6668
- **SSH Tools** - Create reusable command snippets that execute with a single click. Run one command simultaneously across multiple open terminals.
6769
- **Command History** - Auto-complete and view previously ran SSH commands
6870
- **Command Palette** - Double tap left shift to quickly access SSH connections with your keyboard
69-
- **SSH Feature Rich** - Supports jump hosts, warpgate, TOTP based connections, etc.
71+
- **SSH Feature Rich** - Supports jump hosts, warpgate, TOTP based connections, SOCKS5, password autofill, etc.
7072

7173
# Planned Features
7274

@@ -124,7 +126,7 @@ If you need help or want to request a feature with Termix, visit the [Issues](ht
124126
Please be as detailed as possible in your issue, preferably written in English. You can also join the [Discord](https://discord.gg/jVQGdvHDrf) server and visit the support
125127
channel, however, response times may be longer.
126128

127-
# Show-off
129+
# Screenshots
128130

129131
<p align="center">
130132
<img src="./repo-images/Image 1.png" width="400" alt="Termix Demo 1"/>
@@ -143,14 +145,20 @@ channel, however, response times may be longer.
143145

144146
<p align="center">
145147
<img src="./repo-images/Image 7.png" width="400" alt="Termix Demo 7"/>
148+
<img src="./repo-images/Image 8.png" width="400" alt="Termix Demo 8"/>
149+
</p>
150+
151+
<p align="center">
152+
<img src="./repo-images/Image 9.png" width="400" alt="Termix Demo 9"/>
153+
<img src="./repo-images/Image 10.png" width="400" alt="Termix Demo 110"/>
146154
</p>
147155

148156
<p align="center">
149157
<video src="https://github.com/user-attachments/assets/88936e0d-2399-4122-8eee-c255c25da48c" width="800" controls>
150158
Your browser does not support the video tag.
151159
</video>
152160
</p>
153-
Videos and images may be out of date.
161+
Some videos and images may be out of date or may not perfectly showcase features.
154162

155163
# License
156164

docker/Dockerfile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,18 @@ ENV DATA_DIR=/app/data \
5353

5454
RUN apt-get update && apt-get install -y nginx gettext-base openssl && \
5555
rm -rf /var/lib/apt/lists/* && \
56-
mkdir -p /app/data /app/uploads && \
57-
chown -R node:node /app/data /app/uploads && \
58-
useradd -r -s /bin/false nginx
56+
mkdir -p /app/data /app/uploads /app/nginx /app/nginx/logs /app/nginx/cache /app/nginx/client_body && \
57+
chown -R node:node /app && \
58+
chmod 755 /app/data /app/uploads /app/nginx && \
59+
touch /app/nginx/nginx.conf && \
60+
chown node:node /app/nginx/nginx.conf
5961

60-
COPY docker/nginx.conf /etc/nginx/nginx.conf
61-
COPY docker/nginx-https.conf /etc/nginx/nginx-https.conf
62+
COPY docker/nginx.conf /app/nginx/nginx.conf.template
63+
COPY docker/nginx-https.conf /app/nginx/nginx-https.conf.template
6264

63-
COPY --chown=nginx:nginx --from=frontend-builder /app/dist /usr/share/nginx/html
64-
COPY --chown=nginx:nginx --from=frontend-builder /app/src/locales /usr/share/nginx/html/locales
65-
COPY --chown=nginx:nginx --from=frontend-builder /app/public/fonts /usr/share/nginx/html/fonts
65+
COPY --chown=node:node --from=frontend-builder /app/dist /app/html
66+
COPY --chown=node:node --from=frontend-builder /app/src/locales /app/html/locales
67+
COPY --chown=node:node --from=frontend-builder /app/public/fonts /app/html/fonts
6668

6769
COPY --chown=node:node --from=production-deps /app/node_modules /app/node_modules
6870
COPY --chown=node:node --from=backend-builder /app/dist/backend ./dist/backend
@@ -74,4 +76,7 @@ EXPOSE ${PORT} 30001 30002 30003 30004 30005 30006
7476

7577
COPY docker/entrypoint.sh /entrypoint.sh
7678
RUN chmod +x /entrypoint.sh
79+
80+
USER node
81+
7782
CMD ["/entrypoint.sh"]

docker/entrypoint.sh

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,21 @@ echo "Configuring web UI to run on port: $PORT"
1111

1212
if [ "$ENABLE_SSL" = "true" ]; then
1313
echo "SSL enabled - using HTTPS configuration with redirect"
14-
NGINX_CONF_SOURCE="/etc/nginx/nginx-https.conf"
14+
NGINX_CONF_SOURCE="/app/nginx/nginx-https.conf.template"
1515
else
1616
echo "SSL disabled - using HTTP-only configuration (default)"
17-
NGINX_CONF_SOURCE="/etc/nginx/nginx.conf"
17+
NGINX_CONF_SOURCE="/app/nginx/nginx.conf.template"
1818
fi
1919

20-
envsubst '${PORT} ${SSL_PORT} ${SSL_CERT_PATH} ${SSL_KEY_PATH}' < $NGINX_CONF_SOURCE > /etc/nginx/nginx.conf.tmp
21-
mv /etc/nginx/nginx.conf.tmp /etc/nginx/nginx.conf
20+
envsubst '${PORT} ${SSL_PORT} ${SSL_CERT_PATH} ${SSL_KEY_PATH}' < $NGINX_CONF_SOURCE > /app/nginx/nginx.conf
2221

2322
mkdir -p /app/data /app/uploads
24-
chown -R node:node /app/data /app/uploads
25-
chmod 755 /app/data /app/uploads
23+
chmod 755 /app/data /app/uploads 2>/dev/null || true
2624

2725
if [ "$ENABLE_SSL" = "true" ]; then
2826
echo "Checking SSL certificate configuration..."
2927
mkdir -p /app/data/ssl
30-
chown -R node:node /app/data/ssl
31-
chmod 755 /app/data/ssl
28+
chmod 755 /app/data/ssl 2>/dev/null || true
3229

3330
DOMAIN=${SSL_DOMAIN:-localhost}
3431

@@ -84,7 +81,6 @@ EOF
8481

8582
chmod 600 /app/data/ssl/termix.key
8683
chmod 644 /app/data/ssl/termix.crt
87-
chown node:node /app/data/ssl/termix.key /app/data/ssl/termix.crt
8884

8985
rm -f /app/data/ssl/openssl.conf
9086

@@ -93,7 +89,7 @@ EOF
9389
fi
9490

9591
echo "Starting nginx..."
96-
nginx
92+
nginx -c /app/nginx/nginx.conf
9793

9894
echo "Starting backend services..."
9995
cd /app
@@ -110,11 +106,7 @@ else
110106
echo "Warning: package.json not found"
111107
fi
112108

113-
if command -v su-exec > /dev/null 2>&1; then
114-
su-exec node node dist/backend/backend/starter.js
115-
else
116-
su -s /bin/sh node -c "node dist/backend/backend/starter.js"
117-
fi
109+
node dist/backend/backend/starter.js
118110

119111
echo "All services started"
120112

docker/nginx-https.conf

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1+
pid /app/nginx/nginx.pid;
2+
error_log /app/nginx/logs/error.log warn;
3+
14
events {
25
worker_connections 1024;
36
}
47

58
http {
6-
include mime.types;
9+
include /etc/nginx/mime.types;
710
default_type application/octet-stream;
811

12+
access_log /app/nginx/logs/access.log;
13+
14+
client_body_temp_path /app/nginx/client_body;
15+
proxy_temp_path /app/nginx/proxy_temp;
16+
fastcgi_temp_path /app/nginx/fastcgi_temp;
17+
uwsgi_temp_path /app/nginx/uwsgi_temp;
18+
scgi_temp_path /app/nginx/scgi_temp;
19+
920
sendfile on;
1021
keepalive_timeout 65;
1122
client_header_timeout 300s;
@@ -37,9 +48,17 @@ http {
3748
add_header X-Content-Type-Options nosniff always;
3849
add_header X-XSS-Protection "1; mode=block" always;
3950

51+
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
52+
root /app/html;
53+
expires 1y;
54+
add_header Cache-Control "public, immutable";
55+
try_files $uri =404;
56+
}
57+
4058
location / {
41-
root /usr/share/nginx/html;
59+
root /app/html;
4260
index index.html index.htm;
61+
try_files $uri $uri/ /index.html;
4362
}
4463

4564
location ~* \.map$ {
@@ -93,6 +112,15 @@ http {
93112
proxy_set_header X-Forwarded-Proto $scheme;
94113
}
95114

115+
location ~ ^/rbac(/.*)?$ {
116+
proxy_pass http://127.0.0.1:30001;
117+
proxy_http_version 1.1;
118+
proxy_set_header Host $host;
119+
proxy_set_header X-Real-IP $remote_addr;
120+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
121+
proxy_set_header X-Forwarded-Proto $scheme;
122+
}
123+
96124
location ~ ^/credentials(/.*)?$ {
97125
proxy_pass http://127.0.0.1:30001;
98126
proxy_http_version 1.1;
@@ -283,6 +311,10 @@ http {
283311
proxy_set_header X-Real-IP $remote_addr;
284312
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
285313
proxy_set_header X-Forwarded-Proto $scheme;
314+
315+
proxy_connect_timeout 60s;
316+
proxy_send_timeout 60s;
317+
proxy_read_timeout 60s;
286318
}
287319

288320
location ~ ^/uptime(/.*)?$ {
@@ -303,9 +335,45 @@ http {
303335
proxy_set_header X-Forwarded-Proto $scheme;
304336
}
305337

338+
location ^~ /docker/console/ {
339+
proxy_pass http://127.0.0.1:30008/;
340+
proxy_http_version 1.1;
341+
342+
proxy_set_header Upgrade $http_upgrade;
343+
proxy_set_header Connection "upgrade";
344+
proxy_set_header Host $host;
345+
proxy_cache_bypass $http_upgrade;
346+
347+
proxy_set_header X-Real-IP $remote_addr;
348+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
349+
proxy_set_header X-Forwarded-Proto $scheme;
350+
351+
proxy_read_timeout 86400s;
352+
proxy_send_timeout 86400s;
353+
proxy_connect_timeout 10s;
354+
355+
proxy_buffering off;
356+
proxy_request_buffering off;
357+
358+
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
359+
}
360+
361+
location ~ ^/docker(/.*)?$ {
362+
proxy_pass http://127.0.0.1:30007;
363+
proxy_http_version 1.1;
364+
proxy_set_header Host $host;
365+
proxy_set_header X-Real-IP $remote_addr;
366+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
367+
proxy_set_header X-Forwarded-Proto $scheme;
368+
369+
proxy_connect_timeout 60s;
370+
proxy_send_timeout 300s;
371+
proxy_read_timeout 300s;
372+
}
373+
306374
error_page 500 502 503 504 /50x.html;
307375
location = /50x.html {
308-
root /usr/share/nginx/html;
376+
root /app/html;
309377
}
310378
}
311379
}

0 commit comments

Comments
 (0)