{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d58508ec-2805-47e2-b101-ee439a67bff2",
    "slug": "pingvin-share-x",
    "name": "Pingvin Share X",
    "description": "Protected Pingvin file sharing with durable uploads and accounts.",
    "url": "https://railway.com/deploy/pingvin-share-x",
    "upstream": {
      "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
    }
  },
  "services": [
    {
      "name": "Pingvin Share X",
      "source": {
        "image": "smp46/pingvin-share-x:v1.22.1@sha256:38480232d3ec26858e0313e09584b662fde356a32aaf83f6270f26c5414065ec"
      },
      "needs_volume": true,
      "volume_mount_path": "/opt/app/backend/data",
      "http": false
    },
    {
      "name": "Pingvin Gateway",
      "source": {
        "image": "caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGID",
      "service": "Pingvin Share X",
      "description": "Non-root application group ID.",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "PUID",
      "service": "Pingvin Share X",
      "description": "Non-root application user ID.",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "TRUST_PROXY",
      "service": "Pingvin Share X",
      "description": "Trust Railway and the authenticated gateway forwarding headers.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PORT",
      "service": "Pingvin Gateway",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "UPSTREAM",
      "service": "Pingvin Gateway",
      "description": "Private Pingvin endpoint.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "GATEWAY_CONFIG",
      "service": "Pingvin Gateway",
      "description": "Authenticated reverse-proxy configuration.",
      "secret": false,
      "strategy": "default",
      "default": ":8080 {\n  handle /healthz {\n    rewrite * /api/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": "Pingvin Gateway",
      "description": "Generated-bootstrap gateway password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "GATEWAY_USERNAME",
      "service": "Pingvin Gateway",
      "description": "Generated-bootstrap gateway username.",
      "secret": false,
      "strategy": "default",
      "default": "pingvin"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "pingvin-share-x"
      }
    },
    "cli": "railway deploy --template pingvin-share-x",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d58508ec-2805-47e2-b101-ee439a67bff2",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "566ffeaf-2733-424e-9369-9f0a919326d5": {
                  "icon": null,
                  "name": "Pingvin Share X",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "smp46/pingvin-share-x:v1.22.1@sha256:38480232d3ec26858e0313e09584b662fde356a32aaf83f6270f26c5414065ec"
                  },
                  "variables": {
                    "PGID": {
                      "isOptional": false,
                      "description": "Non-root application group ID.",
                      "defaultValue": "1000"
                    },
                    "PUID": {
                      "isOptional": false,
                      "description": "Non-root application user ID.",
                      "defaultValue": "1000"
                    },
                    "TRUST_PROXY": {
                      "isOptional": false,
                      "description": "Trust Railway and the authenticated gateway forwarding headers.",
                      "defaultValue": "true"
                    }
                  },
                  "volumeMounts": {
                    "566ffeaf-2733-424e-9369-9f0a919326d5": {
                      "sizeMB": 5000,
                      "mountPath": "/opt/app/backend/data"
                    }
                  }
                },
                "a4d590c3-91de-47dd-81a7-a4687ea3861f": {
                  "icon": null,
                  "name": "Pingvin 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": "Private Pingvin endpoint.",
                      "defaultValue": "${{Pingvin Share X.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "GATEWAY_CONFIG": {
                      "isOptional": false,
                      "description": "Authenticated reverse-proxy configuration.",
                      "defaultValue": ":8080 {\n  handle /healthz {\n    rewrite * /api/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-bootstrap gateway password.",
                      "defaultValue": "{{GATEWAY_PASSWORD}}"
                    },
                    "GATEWAY_USERNAME": {
                      "isOptional": false,
                      "description": "Generated-bootstrap gateway username.",
                      "defaultValue": "pingvin"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Pingvin Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-11T04:14:34.944Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-10T19:15:34.061Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_e2cb3c4f40364df19221",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 71,
    "typical_build_seconds": 0,
    "typical_start_seconds": 6,
    "slowest_service": "Pingvin Gateway"
  }
}
