# Container Default Configuration
#
# Default config for containerized deployments. The proxy
# listener binds to all interfaces so traffic reaches it
# from outside the container's network namespace; the
# admin endpoint stays on loopback, where the image's
# HEALTHCHECK reaches it.
#
# Usage:
#   docker run -p 8080:8080 praxis:0.1.0
#   curl http://localhost:8080/

admin:
  address: "127.0.0.1:9901"

listeners:
  - name: default
    address: "0.0.0.0:8080"
    filter_chains:
      - default-response

filter_chains:
  - name: default-response
    filters:
      - filter: static_response
        status: 200
        headers:
          - name: Content-Type
            value: application/json
        body: '{"status": "ok", "server": "praxis"}'
        conditions:
          - when:
              path: "/"

      - filter: static_response
        status: 404
        headers:
          - name: Content-Type
            value: application/json
        body: '{"error": "not found"}'
