{
  "manifest_version": "1.0.0",
  "template": {
    "id": "170e1966-7702-4d38-9e94-58fb8e55050b",
    "slug": "goalert",
    "name": "GoAlert",
    "description": "On-call scheduling and escalations — self-hosted PagerDuty alternative",
    "url": "https://railway.com/deploy/goalert",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/goalert-railway"
    }
  },
  "services": [
    {
      "name": "goalert",
      "source": {
        "repo": "https://github.com/nomideusz/goalert-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "DATABASE_URL",
      "service": "goalert",
      "description": "Postgres connection - wired to the bundled database, leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "goalert",
      "description": "Auto-generated - first admin account password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ADMIN_USERNAME",
      "service": "goalert",
      "description": "First admin account username, created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "GOALERT_DATA_ENCRYPTION_KEY",
      "service": "goalert",
      "description": "Auto-generated - encrypts alert data and API keys at rest",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "goalert"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Database superuser (GoAlert enables pgcrypto itself)",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "goalert"
      }
    },
    "cli": "railway deploy --template goalert",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "170e1966-7702-4d38-9e94-58fb8e55050b",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "a1b2c3d4-0001-4000-8000-000000000001": {
                  "icon": "https://raw.githubusercontent.com/target/goalert/master/web/src/app/public/icons/favicon-192.png",
                  "name": "goalert",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/goalert-railway",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "ADMIN_EMAIL": {
                      "isOptional": true,
                      "description": "Email for the first admin account (optional)",
                      "defaultValue": ""
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection - wired to the bundled database, leave as is",
                      "defaultValue": "postgres://${{postgres.POSTGRES_USER}}:${{postgres.POSTGRES_PASSWORD}}@${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{postgres.POSTGRES_DB}}?sslmode=disable"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated - first admin account password",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "First admin account username, created on first boot",
                      "defaultValue": "admin"
                    },
                    "GOALERT_PUBLIC_URL": {
                      "isOptional": true,
                      "description": "Leave empty - derived from your Railway domain automatically",
                      "defaultValue": ""
                    },
                    "GOALERT_DATA_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Auto-generated - encrypts alert data and API keys at rest",
                      "defaultValue": "{{GOALERT_DATA_ENCRYPTION_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                },
                "a1b2c3d4-0002-4000-8000-000000000002": {
                  "icon": "https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/postgresql.svg",
                  "name": "postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "goalert"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database superuser (GoAlert enables pgcrypto itself)",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "a1b2c3d4-0002-4000-8000-000000000002": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "goalert",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-08T22:48:28.038Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_09dfa0b347e74123b6a4",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 58,
    "typical_build_seconds": 20,
    "typical_start_seconds": 20,
    "slowest_service": "goalert"
  }
}
