{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c405d514-94da-4017-aae4-7a7daff7c3d6",
    "slug": "piwigo-template",
    "name": "piwigo-template",
    "description": "Self-host your photos: Piwigo gallery + MariaDB, one-click deploy",
    "url": "https://railway.com/deploy/piwigo-template",
    "upstream": {
      "repo_url": "https://github.com/lNamelessl/piwigo-railway-template"
    }
  },
  "services": [
    {
      "name": "mariadb",
      "source": {
        "repo": "https://github.com/lNamelessl/piwigo-railway-template"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "piwigo",
      "source": {
        "repo": "https://github.com/lNamelessl/piwigo-railway-template"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/www/html/piwigo",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQL_PASSWORD",
      "service": "mariadb",
      "description": "Provide a value for MYSQL_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PIWIGO_DB_HOST",
      "service": "piwigo",
      "description": "Provide a value for PIWIGO_DB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PIWIGO_DB_PASSWORD",
      "service": "piwigo",
      "description": "Provide a value for PIWIGO_DB_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "piwigo-template"
      }
    },
    "cli": "railway deploy --template piwigo-template",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c405d514-94da-4017-aae4-7a7daff7c3d6",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "5a3dbe7a-a756-47b4-9564-4be7348811e5": {
                  "icon": null,
                  "name": "mariadb",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/lNamelessl/piwigo-railway-template",
                    "rootDirectory": "mariadb"
                  },
                  "variables": {
                    "MYSQL_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{MYSQL_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "5a3dbe7a-a756-47b4-9564-4be7348811e5": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "8911bffa-16f6-4bda-a695-292e5e2eaf4c": {
                  "icon": null,
                  "name": "piwigo",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/lNamelessl/piwigo-railway-template",
                    "rootDirectory": "piwigo"
                  },
                  "variables": {
                    "PIWIGO_DB_HOST": {
                      "isOptional": false,
                      "defaultValue": "${{mariadb.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PIWIGO_DB_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{mariadb.MYSQL_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  },
                  "volumeMounts": {
                    "8911bffa-16f6-4bda-a695-292e5e2eaf4c": {
                      "mountPath": "/var/www/html/piwigo"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-28T22:14:58.605Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-28T19:46:34.832Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_0d5766420de1438a9102",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 68,
    "typical_build_seconds": 40,
    "typical_start_seconds": 10,
    "slowest_service": "piwigo"
  }
}
