{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a047291f-e9c2-4083-8c1b-7fb3a7778e15",
    "slug": "pRF69q",
    "name": "Mage AI",
    "description": "The modern replacement for Airflow",
    "url": "https://railway.com/deploy/pRF69q",
    "upstream": {
      "image": "mageai/mageai"
    }
  },
  "services": [
    {
      "name": "Mage",
      "source": {
        "image": "mageai/mageai"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/src",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:15"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "JWT_SECRET",
      "service": "Mage",
      "description": "The json web token secret used for encoding and decoding access tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MAGE_PUBLIC_HOST",
      "service": "Mage",
      "description": "The public host url that can be used to access the Mage app",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "JWT_DOWNLOAD_SECRET",
      "service": "Mage",
      "description": " The json web token secret used for encoding and decoding download tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "REQUIRE_USER_AUTHENTICATION",
      "service": "Mage",
      "description": "Enable user authentication in Mage",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "MAGE_DATABASE_CONNECTION_URL",
      "service": "Mage",
      "description": "Configure Mage to connect to Postgres over the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MAGE_ACCESS_TOKEN_EXPIRY_TIME",
      "service": "Mage",
      "description": "7 days -  The expiration time of a Mage access token in seconds",
      "secret": true,
      "strategy": "default",
      "default": "604800"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "On-disk database location",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Public database URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database username",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PRIVATE_URL",
      "service": "Postgres",
      "description": "Private URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "pRF69q"
      }
    },
    "cli": "railway deploy --template pRF69q",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a047291f-e9c2-4083-8c1b-7fb3a7778e15",
            "serializedConfig": {
              "services": {
                "b0105f51-7f7c-49a7-8820-e88cbbc3e19a": {
                  "icon": "https://res.cloudinary.com/h5kvzw/image/upload/v1714086834/mage-icon-dark_vsqxrg.svg",
                  "name": "Mage",
                  "build": {},
                  "deploy": {
                    "startCommand": "/bin/sh -c \"exec /app/run_app.sh mage start --host 0.0.0.0 --port $PORT\"",
                    "healthcheckPath": "/api/statuses"
                  },
                  "source": {
                    "image": "mageai/mageai"
                  },
                  "variables": {
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "The json web token secret used for encoding and decoding access tokens",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "MAGE_PUBLIC_HOST": {
                      "isOptional": false,
                      "description": "The public host url that can be used to access the Mage app",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "JWT_DOWNLOAD_SECRET": {
                      "isOptional": false,
                      "description": " The json web token secret used for encoding and decoding download tokens",
                      "defaultValue": "{{JWT_DOWNLOAD_SECRET}}"
                    },
                    "REQUIRE_USER_AUTHENTICATION": {
                      "isOptional": false,
                      "description": "Enable user authentication in Mage",
                      "defaultValue": "1"
                    },
                    "MAGE_DATABASE_CONNECTION_URL": {
                      "isOptional": false,
                      "description": "Configure Mage to connect to Postgres over the private network",
                      "defaultValue": "${{Postgres.DATABASE_PRIVATE_URL}}"
                    },
                    "MAGE_ACCESS_TOKEN_EXPIRY_TIME": {
                      "isOptional": false,
                      "description": "7 days -  The expiration time of a Mage access token in seconds",
                      "defaultValue": "604800"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "b0105f51-7f7c-49a7-8820-e88cbbc3e19a": {
                      "mountPath": "/home/src"
                    }
                  }
                },
                "eb80ca7b-b12f-4036-81f7-ad730fa532af": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {},
                  "source": {
                    "image": "postgres:15"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "On-disk database location",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Public database URL",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database username",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PRIVATE_URL": {
                      "isOptional": false,
                      "description": "Private URL",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{POSTGRES_DB}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "eb80ca7b-b12f-4036-81f7-ad730fa532af": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Mage",
      "method": "GET",
      "path": "/api/statuses",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T14:50:22.930Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_a6ef960212c340129a43",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,FAILED"
      }
    ]
  }
}
