{
  "manifest_version": "1.0.0",
  "template": {
    "id": "0dec3c1b-7e64-4097-8bf0-2095e0c16c88",
    "slug": "victorialogs-logging",
    "name": "VictoriaLogs logging",
    "description": "Authenticated VictoriaLogs with durable 14-day log storage.",
    "url": "https://railway.com/deploy/victorialogs-logging",
    "upstream": {
      "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
    }
  },
  "services": [
    {
      "name": "VictoriaLogs",
      "source": {
        "image": "victoriametrics/victoria-logs:v1.52.0@sha256:47b820890d64c4575a2a0a46415dcd8a4fd59a0f1fcd6a377693d7aea639442e"
      },
      "needs_volume": true,
      "volume_mount_path": "/vlogs",
      "http": false
    },
    {
      "name": "VictoriaLogs Gateway",
      "source": {
        "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "VictoriaLogs",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "9428"
    },
    {
      "key": "PORT",
      "service": "VictoriaLogs Gateway",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "UPSTREAM",
      "service": "VictoriaLogs Gateway",
      "description": "Provide a value for UPSTREAM.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GATEWAY_CONFIG",
      "service": "VictoriaLogs Gateway",
      "description": "Provide a value for GATEWAY_CONFIG.",
      "secret": false,
      "strategy": "default",
      "default": ":8080 {\n  handle /healthz {\n    rewrite * /health\n    reverse_proxy http://__UPSTREAM__\n  }\n  @protected not path /healthz\n  basic_auth @protected {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle {\n    reverse_proxy http://__UPSTREAM__ {\n      header_up -Authorization\n    }\n  }\n}"
    },
    {
      "key": "GATEWAY_PASSWORD",
      "service": "VictoriaLogs Gateway",
      "description": "Generated log UI and ingestion password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "GATEWAY_USERNAME",
      "service": "VictoriaLogs Gateway",
      "description": "Log UI and ingestion username.",
      "secret": false,
      "strategy": "default",
      "default": "victorialogs"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "victorialogs-logging"
      }
    },
    "cli": "railway deploy --template victorialogs-logging",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "0dec3c1b-7e64-4097-8bf0-2095e0c16c88",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2cc0c7df-0fce-46fb-8548-ab3714ff9614": {
                  "icon": null,
                  "name": "VictoriaLogs",
                  "deploy": {
                    "startCommand": "/victoria-logs-prod -storageDataPath=/vlogs -retentionPeriod=14d -loggerFormat=json",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "victoriametrics/victoria-logs:v1.52.0@sha256:47b820890d64c4575a2a0a46415dcd8a4fd59a0f1fcd6a377693d7aea639442e"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "9428"
                    }
                  },
                  "volumeMounts": {
                    "2cc0c7df-0fce-46fb-8548-ab3714ff9614": {
                      "sizeMB": 5000,
                      "mountPath": "/vlogs"
                    }
                  }
                },
                "edb0bc1f-979e-4205-9321-f826806aa8cd": {
                  "icon": null,
                  "name": "VictoriaLogs Gateway",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'password_hash=\"$(caddy hash-password --plaintext \"$GATEWAY_PASSWORD\")\"; printf \"%s\\n\" \"$GATEWAY_CONFIG\" | sed -e \"s|__USERNAME__|$GATEWAY_USERNAME|g\" -e \"s|__PASSWORD_HASH__|$password_hash|g\" -e \"s|__UPSTREAM__|$UPSTREAM|g\" >/tmp/Caddyfile; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8080"
                    },
                    "UPSTREAM": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{VictoriaLogs.RAILWAY_PRIVATE_DOMAIN}}:9428"
                    },
                    "GATEWAY_CONFIG": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": ":8080 {\n  handle /healthz {\n    rewrite * /health\n    reverse_proxy http://__UPSTREAM__\n  }\n  @protected not path /healthz\n  basic_auth @protected {\n    __USERNAME__ __PASSWORD_HASH__\n  }\n  handle {\n    reverse_proxy http://__UPSTREAM__ {\n      header_up -Authorization\n    }\n  }\n}"
                    },
                    "GATEWAY_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated log UI and ingestion password.",
                      "defaultValue": "{{GATEWAY_PASSWORD}}"
                    },
                    "GATEWAY_USERNAME": {
                      "isOptional": false,
                      "description": "Log UI and ingestion username.",
                      "defaultValue": "victorialogs"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "VictoriaLogs Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T10:14:45.332Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-05T00:09:58.286Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_e1c9cbec66384bb5ba39",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 97,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "VictoriaLogs Gateway"
  }
}
