# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: GMSSH
spec:
    description: GMSSH is a visual server operations & SSH management tool, designed for efficient and secure private deployment.
    icon: https://doc-dev.gmssh.com/gmssh.png
    variables:
        - key: GMSSH_DOMAIN
          type: DOMAIN
          name: GMSSH Domain
          description: The domain name of GMSSH.
    readme: |
        # GMSSH
        GMSSH is a visual server operations tool that helps you manage servers via SSH with monitoring, file management and security features.

        ## Access
        Open the bound domain to visit GMSSH.

        ## Persistent data
        - Logs: /gs_logs
        - Config: /app/config
    services:
        - name: GMSSH
          icon: https://doc-dev.gmssh.com/gmssh.png
          template: PREBUILT_V2
          spec:
            source:
                image: docker-rep.gmssh.com/gmssh/gs-main-x86:latest
            ports:
                - id: web
                  port: 80
                  type: HTTP
            volumes:
                - id: logs
                  dir: /gs_logs
                - id: config
                  dir: /app/config
            env: {}
            configs:
                - path: /app/config/config.json
                  template: |
                    {
                      "log_level": "debug",
                      "http_port": "80",
                      "cleaner_interval": "5m",
                      "cleaner_timeout": "30m",
                      "authCode":"",
                      "credential": {
                        "storage_type": "encrypt",
                        "position": "credential.json"
                      },
                      "web_access_control": {
                        "allowed_directories": [
                          "/web/appcenter/",
                          "/web/app_ext/"
                        ]
                      },
                      "logger": {
                        "path": "../gs_logs",
                        "file": "gs-{Y-m-d}.log",
                        "level": "debug",
                        "stdout": false,
                        "StStatus": 0,
                        "rotateBackupLimit": 7,
                        "writerColorEnable": true,
                        "RotateBackupCompress": 9,
                        "rotateExpire": "1d",
                        "Flag": 44
                      },
                      "mfa": {
                        "mfaDir": "/app/config/mfa",
                        "oldMfaFile": "mfa.json"
                      },
                      "login_log": {
                        "enabled": false,
                        "log_path": "./login_logs",
                        "log_file": "login-{Y-m-d}.log",
                        "max_size_mb": 100,
                        "max_age_days": 30,
                        "max_backups": 10,
                        "compress": true
                      },
                      "ip_whitelist": {
                        "enabled": false,
                        "allowed_ips": []
                      },
                      "displayCornerInfo": true,
                      "term_log": {
                        "enabled": false,
                        "log_path": "./term_logs",
                        "max_retention_days": 30,
                        "auto_cleanup": true
                      },
                      "versionType":"2"
                    }
                  permission: null
                  envsubst: null
          domainKey: GMSSH_DOMAIN
localization:
    zh-CN:
        description: GMSSH 是一款服务器可视化运维与 SSH 管理工具，适合私有化部署与集中式管理。
        readme: |
            # GMSSH
            GMSSH 是一款服务器可视化运维工具，可通过 SSH 对服务器进行集中管理，并提供监控、文件管理与安全相关能力。

            ## 访问方式
            绑定域名后，直接通过域名访问 GMSSH。

            ## 数据持久化
            - 日志目录：/gs_logs
            - 配置目录：/app/config
    zh-TW:
        description: GMSSH 是一款伺服器可視化維運與 SSH 管理工具，適合私有化部署與集中式管理。
        readme: |
            # GMSSH
            GMSSH 是一款伺服器可視化維運工具，可透過 SSH 進行集中管理，並提供監控、檔案管理與安全相關能力。

            ## 存取方式
            綁定網域後，直接透過網域存取 GMSSH。

            ## 資料持久化
            - 日誌目錄：/gs_logs
            - 設定目錄：/app/config
