# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: nginx
spec:
    description: High-performance HTTP server and reverse proxy.
    coverImage: https://kinsta.com/wp-content/uploads/2018/03/what-is-nginx.png
    icon: https://www.svgrepo.com/show/373924/nginx.svg
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: The domain name for your Nginx server.
    tags:
        - Web Server
        - Proxy
    readme: |
        # Nginx

        Nginx is a powerful, open-source web server and reverse proxy that can handle a large number of concurrent connections efficiently. It's known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

        ## Features

        - High-performance web server
        - Reverse proxy with caching capabilities
        - Load balancing
        - HTTP/2 support
        - WebSocket support
        - Handling of static files, index files, and auto-indexing
        - TLS/SSL with SNI
    services:
        - name: nginx
          icon: https://www.svgrepo.com/show/373924/nginx.svg
          template: PREBUILT
          spec:
            source:
                image: nginx:1.29
            ports:
                - id: web
                  port: 80
                  type: HTTP
            configs:
                - path: /etc/nginx/nginx.conf
                  template: |
                    worker_processes  5;
                    error_log  stderr;
                    worker_rlimit_nofile 8192;

                    events {}

                    http {
                      default_type application/octet-stream;
                      log_format   main '$remote_addr - $remote_user [$time_local]  $status '
                        '"$request" $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "$http_x_forwarded_for"';
                      access_log   /dev/stdout  main;
                      sendfile     on;
                      tcp_nopush   on;
                      server_names_hash_bucket_size 128;

                      server {
                        listen 80 default_server;
                        server_name _;

                        location / {
                          add_header Content-Type text/plain;
                          return 200 'Hello from Nginx deployed on Zeabur!';
                        }

                      }
                    }
                  permission: null
                  envsubst: null
          domainKey: PUBLIC_DOMAIN
localization:
    ja-JP:
        description: 高性能 HTTP サーバーとリバースプロキシ。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: ドメイン
              description: Nginx サーバーのドメイン名。
        readme: |
            # Nginx

            Nginx は、大量の同時接続を効率的に処理できる強力なオープンソースの Web サーバーおよびリバースプロキシです。高性能、安定性、豊富な機能セット、シンプルな設定、低リソース消費で知られています。

            ## 特徴

            - 高性能 Web サーバー
            - キャッシュ機能付きリバースプロキシ
            - ロードバランシング
            - HTTP/2 サポート
            - WebSocket サポート
            - 静的ファイル、インデックスファイル、自動インデックスの処理
            - TLS/SSL と SNI のサポート
    zh-CN:
        description: 高性能 HTTP 服务器和反向代理。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 域名
              description: 您的 Nginx 服务器的域名。
        readme: |
            # Nginx

            Nginx 是一个强大的开源 Web 服务器和反向代理，能够高效处理大量并发连接。它以高性能、稳定性、丰富的功能集、简单的配置和低资源消耗而闻名。

            ## 特性

            - 高性能 Web 服务器
            - 具有缓存功能的反向代理
            - 负载均衡
            - HTTP/2 支持
            - WebSocket 支持
            - 处理静态文件、索引文件和自动索引
            - 支持 TLS/SSL 和 SNI
    zh-TW:
        description: 高效能 HTTP 伺服器和反向代理。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 網域
              description: 您的 Nginx 伺服器的網域名稱。
        readme: |
            # Nginx

            Nginx 是一個強大的開源 Web 伺服器和反向代理，能夠高效處理大量並發連接。它以高效能、穩定性、豐富的功能集、簡單的配置和低資源消耗而聞名。

            ## 特性

            - 高效能 Web 伺服器
            - 具有快取功能的反向代理
            - 負載平衡
            - HTTP/2 支援
            - WebSocket 支援
            - 處理靜態檔案、索引檔案和自動索引
            - 支援 TLS/SSL 和 SNI
