{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e1fb9bd3-6cdf-4381-a8e4-63ba40f657e2",
    "slug": "apostrophecms",
    "name": "ApostropheCMS",
    "description": "Node.js CMS where editors change pages on the page itself",
    "url": "https://railway.com/deploy/apostrophecms",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/apostrophe-railway"
    }
  },
  "services": [
    {
      "name": "MongoDB",
      "source": {
        "image": "mongo:8.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/db",
      "http": false
    },
    {
      "name": "apostrophe",
      "source": {
        "repo": "https://github.com/gridalpha/apostrophe-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MONGOHOST",
      "service": "MongoDB",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MONGOPORT",
      "service": "MongoDB",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "27017"
    },
    {
      "key": "MONGOUSER",
      "service": "MongoDB",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MONGO_URL",
      "service": "MongoDB",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MONGOPASSWORD",
      "service": "MongoDB",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MONGO_INITDB_ROOT_PASSWORD",
      "service": "MongoDB",
      "description": "Root password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MONGO_INITDB_ROOT_USERNAME",
      "service": "MongoDB",
      "description": "Root user, read by the server on init",
      "secret": false,
      "strategy": "default",
      "default": "mongo"
    },
    {
      "key": "PORT",
      "service": "apostrophe",
      "description": "HTTP port Railway probes",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "APOS_DB_URI",
      "service": "apostrophe",
      "description": "MongoDB connection for all content",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "APOS_BASE_URL",
      "service": "apostrophe",
      "description": "Public base URL for absolute links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "apostrophe",
      "description": "First administrator's password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ADMIN_USERNAME",
      "service": "apostrophe",
      "description": "First administrator's login name",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "APOS_SESSION_SECRET",
      "service": "apostrophe",
      "description": "Signs session cookies",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APOS_CLUSTER_PROCESSES",
      "service": "apostrophe",
      "description": "Node worker processes per container",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "apostrophe",
      "description": "First-boot health check window",
      "secret": false,
      "strategy": "default",
      "default": "600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "apostrophecms"
      }
    },
    "cli": "railway deploy --template apostrophecms",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e1fb9bd3-6cdf-4381-a8e4-63ba40f657e2",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "ce3ae29a-b5a8-4f8b-889a-91aeb937df5d": {
                  "icon": "https://cdn.simpleicons.org/mongodb/47A248.svg",
                  "name": "MongoDB",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mongod --ipv6 --bind_ip ::,0.0.0.0 --setParameter diagnosticDataCollectionEnabled=false",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mongo:8.0"
                  },
                  "variables": {
                    "MONGOHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MONGOPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "27017"
                    },
                    "MONGOUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{MONGO_INITDB_ROOT_USERNAME}}"
                    },
                    "MONGO_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "mongodb://${{MONGO_INITDB_ROOT_USERNAME}}:${{MONGO_INITDB_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:27017"
                    },
                    "MONGOPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{MONGO_INITDB_ROOT_PASSWORD}}"
                    },
                    "MONGO_INITDB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password, read by the server",
                      "defaultValue": "{{MONGO_INITDB_ROOT_PASSWORD}}"
                    },
                    "MONGO_INITDB_ROOT_USERNAME": {
                      "isOptional": false,
                      "description": "Root user, read by the server on init",
                      "defaultValue": "mongo"
                    }
                  },
                  "volumeMounts": {
                    "ce3ae29a-b5a8-4f8b-889a-91aeb937df5d": {
                      "mountPath": "/data/db"
                    }
                  }
                },
                "f478f5cd-c9f1-4dcb-85cd-91acbb3a428d": {
                  "icon": "https://cdn.jsdelivr.net/gh/apostrophecms/apostrophe@main/logo.svg",
                  "name": "apostrophe",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/apostrophe-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Railway probes",
                      "defaultValue": "3000"
                    },
                    "APOS_DB_URI": {
                      "isOptional": false,
                      "description": "MongoDB connection for all content",
                      "defaultValue": "${{MongoDB.MONGO_URL}}/apostrophe?authSource=admin"
                    },
                    "APOS_BASE_URL": {
                      "isOptional": false,
                      "description": "Public base URL for absolute links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator's password",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "First administrator's login name",
                      "defaultValue": "admin"
                    },
                    "APOS_SESSION_SECRET": {
                      "isOptional": false,
                      "description": "Signs session cookies",
                      "defaultValue": "{{APOS_SESSION_SECRET}}"
                    },
                    "APOS_CLUSTER_PROCESSES": {
                      "isOptional": false,
                      "description": "Node worker processes per container",
                      "defaultValue": "2"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First-boot health check window",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "f478f5cd-c9f1-4dcb-85cd-91acbb3a428d": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "apostrophe",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-16T22:14:52.145Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-16T20:31:38.420Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_7f5cbeecf3924498a8da",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 173,
    "typical_build_seconds": 102,
    "typical_start_seconds": 20,
    "slowest_service": "apostrophe"
  }
}
