From e149fba24fbec5c13e652fd635ae285393a6c609 Mon Sep 17 00:00:00 2001 From: fivemoons Date: Sat, 20 Dec 2025 08:41:01 +0800 Subject: [PATCH] add next-terminal --- next-terminal/config.yaml | 43 ++++++++++++++++++++++++++++++++ next-terminal/docker-compose.yml | 32 ++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 next-terminal/config.yaml create mode 100644 next-terminal/docker-compose.yml diff --git a/next-terminal/config.yaml b/next-terminal/config.yaml new file mode 100644 index 0000000..093da61 --- /dev/null +++ b/next-terminal/config.yaml @@ -0,0 +1,43 @@ +Database: + Enabled: true + Type: postgres + Postgres: + Hostname: postgresql + Port: 5432 + Username: next-terminal + Password: 6j3q0hbku7e5 + Database: next-terminal + ShowSql: false +log: + Level: debug # 日志等级 debug,info,waring,error + Filename: ./logs/nt.log + +Server: + Addr: "0.0.0.0:8088" + +App: + Website: + AccessLog: "./logs/access.log" # web 资产的访问日志路径 + Recording: + Type: "local" # 录屏文件存储位置,可选 local, s3 + Path: "/usr/local/next-terminal/data/recordings" + Guacd: + Drive: "/usr/local/next-terminal/data/drive" + Hosts: + - Hostname: guacd + Port: 4822 + Weight: 1 + # 反向代理配置,详情参考 https://docs.next-terminal.typesafe.cn/install/config-desc.html + ReverseProxy: + Enabled: false # 是否启用反向代理 + HttpEnabled: true # 是否启用 http 反向代理 + HttpAddr: ":80" # http 监听地址 + HttpRedirectToHttps: false # 是否强制 http 访问转为 https + HttpsEnabled: true # 是否启用 https 反向代理 + HttpsAddr: ":443" # https 监听地址 + SelfProxyEnabled: true # 是否启用自代理 + SelfDomain: "nt.yourdomain.com" # 自代理域名,SelfProxyEnabled 为 true 时生效 + Root: "" # 系统根路径,SelfProxyEnabled 为 flase 时生效。示例:https://nt.yourdomain.com + IpExtractor: "direct" # ip 提取方式,可选 direct, x-forwarded-for, x-real-ip + IpTrustList: # 信任的IP地址列表 + - "0.0.0.0/0" \ No newline at end of file diff --git a/next-terminal/docker-compose.yml b/next-terminal/docker-compose.yml new file mode 100644 index 0000000..793662c --- /dev/null +++ b/next-terminal/docker-compose.yml @@ -0,0 +1,32 @@ +services: + guacd: + container_name: guacd + image: registry.cn-beijing.aliyuncs.com/dushixiang/guacd:latest + volumes: + - ./data:/usr/local/next-terminal/data + restart: always + postgresql: + container_name: postgresql + image: registry.cn-beijing.aliyuncs.com/dushixiang/postgres:16.4 + environment: + POSTGRES_DB: next-terminal + POSTGRES_USER: next-terminal + POSTGRES_PASSWORD: next-terminal + volumes: + - ./data/postgresql:/var/lib/postgresql/data + restart: always + next-terminal: + container_name: next-terminal + image: registry.cn-beijing.aliyuncs.com/dushixiang/next-terminal:latest + ports: + - "8088:8088" # Web管理界面 + - "2022:2022" # SSH Server 端口 (可选) + volumes: + - /etc/localtime:/etc/localtime:ro + - ./data:/usr/local/next-terminal/data + - ./logs:/usr/local/next-terminal/logs + - ./config.yaml:/etc/next-terminal/config.yaml + depends_on: + - postgresql + - guacd + restart: always \ No newline at end of file