{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1252927b-14ea-4cf2-b12d-a9d354b330fe",
    "slug": "imgproxy-cache",
    "name": "imgproxy",
    "description": "Image server that resizes and converts images straight from a URL",
    "url": "https://railway.com/deploy/imgproxy-cache",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/imgproxy-cache-railway"
    }
  },
  "services": [
    {
      "name": "imgproxy",
      "source": {
        "image": "darthsim/imgproxy:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "cache",
      "source": {
        "repo": "https://github.com/gridalpha/imgproxy-cache-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/cache",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "imgproxy",
      "description": "HTTP listen port, read by imgproxy itself",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "IMGPROXY_KEY",
      "service": "imgproxy",
      "description": "Hex HMAC key for URL signatures",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "IMGPROXY_SALT",
      "service": "imgproxy",
      "description": "Hex HMAC salt for URL signatures",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PRIVATE_ORIGIN",
      "service": "imgproxy",
      "description": "Private host:port for the cache tier",
      "secret": false,
      "strategy": "default",
      "default": "imgproxy.railway.internal:8080"
    },
    {
      "key": "IMGPROXY_USE_S3",
      "service": "imgproxy",
      "description": "Enables the s3:// source scheme",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "AWS_ACCESS_KEY_ID",
      "service": "imgproxy",
      "description": "Bucket access key, AWS SDK default chain",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "IMGPROXY_AUTO_AVIF",
      "service": "imgproxy",
      "description": "AVIF negotiation from Accept header",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "IMGPROXY_AUTO_WEBP",
      "service": "imgproxy",
      "description": "WebP negotiation from Accept header",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "IMGPROXY_S3_REGION",
      "service": "imgproxy",
      "description": "Bucket placement region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "IMGPROXY_S3_ENDPOINT",
      "service": "imgproxy",
      "description": "Object storage endpoint URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_SECRET_ACCESS_KEY",
      "service": "imgproxy",
      "description": "Bucket secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "IMGPROXY_PROMETHEUS_BIND",
      "service": "imgproxy",
      "description": "Private metrics listener, must differ from PORT",
      "secret": false,
      "strategy": "default",
      "default": ":8081"
    },
    {
      "key": "IMGPROXY_S3_ALLOWED_BUCKETS",
      "service": "imgproxy",
      "description": "Restrict reads to this bucket",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "cache",
      "description": "nginx listen port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "CACHE_TTL",
      "service": "cache",
      "description": "Freshness window for 200/301/302",
      "secret": false,
      "strategy": "default",
      "default": "30d"
    },
    {
      "key": "CACHE_INACTIVE",
      "service": "cache",
      "description": "Eviction window for unrequested entries",
      "secret": false,
      "strategy": "default",
      "default": "30d"
    },
    {
      "key": "CACHE_MAX_SIZE",
      "service": "cache",
      "description": "Disk budget for cached images",
      "secret": false,
      "strategy": "default",
      "default": "3g"
    },
    {
      "key": "IMGPROXY_UPSTREAM",
      "service": "cache",
      "description": "host:port of the processing service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "imgproxy-cache"
      }
    },
    "cli": "railway deploy --template imgproxy-cache",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1252927b-14ea-4cf2-b12d-a9d354b330fe",
            "serializedConfig": {
              "buckets": {
                "60db6064-535b-40d1-9aba-cdbf2a636cdb": {
                  "name": "imgproxy-images"
                }
              },
              "services": {
                "854a18c1-2bc2-4c37-b301-fcdeb075d048": {
                  "icon": "https://raw.githubusercontent.com/imgproxy/imgproxy/master/logo.svg",
                  "name": "imgproxy",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "darthsim/imgproxy:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listen port, read by imgproxy itself",
                      "defaultValue": "8080"
                    },
                    "IMGPROXY_KEY": {
                      "isOptional": false,
                      "description": "Hex HMAC key for URL signatures",
                      "defaultValue": "{{IMGPROXY_KEY}}"
                    },
                    "IMGPROXY_SALT": {
                      "isOptional": false,
                      "description": "Hex HMAC salt for URL signatures",
                      "defaultValue": "{{IMGPROXY_SALT}}"
                    },
                    "PRIVATE_ORIGIN": {
                      "isOptional": false,
                      "description": "Private host:port for the cache tier",
                      "defaultValue": "imgproxy.railway.internal:8080"
                    },
                    "IMGPROXY_USE_S3": {
                      "isOptional": false,
                      "description": "Enables the s3:// source scheme",
                      "defaultValue": "true"
                    },
                    "AWS_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Bucket access key, AWS SDK default chain",
                      "defaultValue": "${{imgproxy-images.ACCESS_KEY_ID}}"
                    },
                    "IMGPROXY_AUTO_AVIF": {
                      "isOptional": true,
                      "description": "AVIF negotiation from Accept header",
                      "defaultValue": "true"
                    },
                    "IMGPROXY_AUTO_WEBP": {
                      "isOptional": true,
                      "description": "WebP negotiation from Accept header",
                      "defaultValue": "true"
                    },
                    "IMGPROXY_S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket placement region",
                      "defaultValue": "${{imgproxy-images.REGION}}"
                    },
                    "IMGPROXY_S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Object storage endpoint URL",
                      "defaultValue": "${{imgproxy-images.ENDPOINT}}"
                    },
                    "AWS_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Bucket secret key",
                      "defaultValue": "${{imgproxy-images.SECRET_ACCESS_KEY}}"
                    },
                    "IMGPROXY_PROMETHEUS_BIND": {
                      "isOptional": true,
                      "description": "Private metrics listener, must differ from PORT",
                      "defaultValue": ":8081"
                    },
                    "IMGPROXY_S3_ALLOWED_BUCKETS": {
                      "isOptional": false,
                      "description": "Restrict reads to this bucket",
                      "defaultValue": "${{imgproxy-images.BUCKET}}"
                    }
                  }
                },
                "f99ae970-b482-45ca-a572-492151b9b037": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/nginx.svg",
                  "name": "cache",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/imgproxy-cache-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "nginx listen port",
                      "defaultValue": "8080"
                    },
                    "CACHE_TTL": {
                      "isOptional": true,
                      "description": "Freshness window for 200/301/302",
                      "defaultValue": "30d"
                    },
                    "CACHE_INACTIVE": {
                      "isOptional": true,
                      "description": "Eviction window for unrequested entries",
                      "defaultValue": "30d"
                    },
                    "CACHE_MAX_SIZE": {
                      "isOptional": true,
                      "description": "Disk budget for cached images",
                      "defaultValue": "3g"
                    },
                    "IMGPROXY_UPSTREAM": {
                      "isOptional": false,
                      "description": "host:port of the processing service",
                      "defaultValue": "${{imgproxy.PRIVATE_ORIGIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "f99ae970-b482-45ca-a572-492151b9b037": {
                      "mountPath": "/cache"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "cache",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-04T05:44:27.711Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-04T05:38:59.028Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_10dde6368b1d450582bd",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,FAILED"
      }
    ]
  }
}
