# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Zeabur App Gateway (Beta)
spec:
    description: An HTTP gateway with built-in compression, WAF, and caching features.
    icon: https://cdn.zeabur.com/app-gateway/icon.svg
    variables:
        - key: UPSTREAM_URL
          type: STRING
          name: Upstream URL
          description: 'The internal URL of the service to protect. Example: http://service.zeabur.internal:8080'
    readme: |
        # Zeabur App Gateway (Beta)

        ![Zeabur App Gateway (Beta)](https://cdn.zeabur.com/app-gateway/icon.svg)

        An HTTP gateway with built-in compression, WAF, and caching features.

        > Zeabur App Gateway is in preview and is not ready for production use.
        >
        > Feel free to report any issues or feedback to us.

        ## Variables

        - `UPSTREAM_URL`: The internal URL of the service to protect. Example: http://service.zeabur.internal:8080
        - `WHITELIST_CLIENT_IPS`: The IP lists that won't trigger the WAF, separated with spaces.
        - `BLACKLIST_CLIENT_IPS`: The IP lists that always block, separated with spaces.
    services:
        - name: app-gateway
          icon: https://cdn.zeabur.com/app-gateway/icon.svg
          template: PREBUILT_V2
          spec:
            source:
                image: docker.io/zeabur/app-gateway:latest
            ports:
                - id: web
                  port: 8080
                  type: HTTP
            env:
                BLACKLIST_CLIENT_IPS:
                    default: ""
                WHITELIST_CLIENT_IPS:
                    default: ""
