{
  "manifest_version": "1.0.0",
  "template": {
    "id": "be25ff92-2c34-411a-877d-bdb56a27dced",
    "slug": "healthchecks-cron-monitoring",
    "name": "Healthchecks cron monitoring",
    "description": "Durable cron and background-job monitoring with PostgreSQL.",
    "url": "https://railway.com/deploy/healthchecks-cron-monitoring",
    "upstream": {
      "image": "healthchecks/healthchecks:v4.3@sha256:cd7bcd94350818b3944f82eb5995f48bdeab8c8627977578a569ffa73f56f56f"
    }
  },
  "services": [
    {
      "name": "Healthchecks",
      "source": {
        "image": "healthchecks/healthchecks:v4.3@sha256:cd7bcd94350818b3944f82eb5995f48bdeab8c8627977578a569ffa73f56f56f"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "DB",
      "service": "Healthchecks",
      "description": "Provide a value for DB.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "PORT",
      "service": "Healthchecks",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "DEBUG",
      "service": "Healthchecks",
      "description": "Provide a value for DEBUG.",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "DB_HOST",
      "service": "Healthchecks",
      "description": "Provide a value for DB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_NAME",
      "service": "Healthchecks",
      "description": "Provide a value for DB_NAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "Healthchecks",
      "description": "Provide a value for DB_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "DB_USER",
      "service": "Healthchecks",
      "description": "Provide a value for DB_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SITE_NAME",
      "service": "Healthchecks",
      "description": "Provide a value for SITE_NAME.",
      "secret": false,
      "strategy": "default",
      "default": "Healthchecks"
    },
    {
      "key": "SITE_ROOT",
      "service": "Healthchecks",
      "description": "Canonical public HTTPS URL derived from the Railway domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_SSLMODE",
      "service": "Healthchecks",
      "description": "Provide a value for DB_SSLMODE.",
      "secret": false,
      "strategy": "default",
      "default": "prefer"
    },
    {
      "key": "SECRET_KEY",
      "service": "Healthchecks",
      "description": "Generated Django signing secret; keep stable.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DB_PASSWORD",
      "service": "Healthchecks",
      "description": "Provide a value for DB_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOWED_HOSTS",
      "service": "Healthchecks",
      "description": "Allows only the public, private, and Railway health-check hosts.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SUPERUSER_EMAIL",
      "service": "Healthchecks",
      "description": "Initial administrator login email.",
      "secret": false,
      "strategy": "default",
      "default": "admin@railway.local"
    },
    {
      "key": "REGISTRATION_OPEN",
      "service": "Healthchecks",
      "description": "Disables public account creation by default.",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "DEFAULT_FROM_EMAIL",
      "service": "Healthchecks",
      "description": "Sender address used after SMTP is configured.",
      "secret": false,
      "strategy": "default",
      "default": "healthchecks@railway.local"
    },
    {
      "key": "SUPERUSER_PASSWORD",
      "service": "Healthchecks",
      "description": "Generated initial administrator password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "EMAIL_USE_VERIFICATION",
      "service": "Healthchecks",
      "description": "Provide a value for EMAIL_USE_VERIFICATION.",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "INTEGRATIONS_ALLOW_PRIVATE_IPS",
      "service": "Healthchecks",
      "description": "Provide a value for INTEGRATIONS_ALLOW_PRIVATE_IPS.",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "PORT",
      "service": "Postgres",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Database subdirectory inside the Railway volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Healthchecks database name.",
      "secret": false,
      "strategy": "default",
      "default": "healthchecks"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Healthchecks database user.",
      "secret": false,
      "strategy": "default",
      "default": "healthchecks"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated PostgreSQL password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "healthchecks-cron-monitoring"
      }
    },
    "cli": "railway deploy --template healthchecks-cron-monitoring",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "be25ff92-2c34-411a-877d-bdb56a27dced",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3c594bda-0fff-4ad7-8cc1-2b0503e3b156": {
                  "icon": null,
                  "name": "Healthchecks",
                  "deploy": {
                    "startCommand": "/bin/bash -ec './manage.py migrate; ./manage.py shell -c '\"'\"'from django.contrib.auth.models import User; from hc.accounts.views import _make_user; import os; e=os.environ[\"SUPERUSER_EMAIL\"].lower(); u=User.objects.filter(email=e).first() or _make_user(e); u.is_staff=True; u.is_superuser=True; u.set_password(os.environ[\"SUPERUSER_PASSWORD\"]) if not u.has_usable_password() else None; u.save()'\"'\"'; exec uwsgi /opt/healthchecks/docker/uwsgi.ini'",
                    "healthcheckPath": "/api/v3/status/",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "healthchecks/healthchecks:v4.3@sha256:cd7bcd94350818b3944f82eb5995f48bdeab8c8627977578a569ffa73f56f56f"
                  },
                  "variables": {
                    "DB": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgres"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "8000"
                    },
                    "DEBUG": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "False"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_NAME": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "5432"
                    },
                    "DB_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "SITE_NAME": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "Healthchecks"
                    },
                    "SITE_ROOT": {
                      "isOptional": false,
                      "description": "Canonical public HTTPS URL derived from the Railway domain.",
                      "defaultValue": "https://${{Healthchecks.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_SSLMODE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "prefer"
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "Generated Django signing secret; keep stable.",
                      "defaultValue": "{{SECRET_KEY}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "ALLOWED_HOSTS": {
                      "isOptional": false,
                      "description": "Allows only the public, private, and Railway health-check hosts.",
                      "defaultValue": "${{Healthchecks.RAILWAY_PUBLIC_DOMAIN}},${{Healthchecks.RAILWAY_PRIVATE_DOMAIN}},healthcheck.railway.app"
                    },
                    "SUPERUSER_EMAIL": {
                      "isOptional": false,
                      "description": "Initial administrator login email.",
                      "defaultValue": "admin@railway.local"
                    },
                    "REGISTRATION_OPEN": {
                      "isOptional": false,
                      "description": "Disables public account creation by default.",
                      "defaultValue": "False"
                    },
                    "DEFAULT_FROM_EMAIL": {
                      "isOptional": false,
                      "description": "Sender address used after SMTP is configured.",
                      "defaultValue": "healthchecks@railway.local"
                    },
                    "SUPERUSER_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated initial administrator password.",
                      "defaultValue": "{{SUPERUSER_PASSWORD}}"
                    },
                    "EMAIL_USE_VERIFICATION": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "False"
                    },
                    "INTEGRATIONS_ALLOW_PRIVATE_IPS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "False"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8000
                      }
                    }
                  }
                },
                "6c3be130-52c8-412c-a6b2-b0c727cb97af": {
                  "icon": null,
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": null,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "5432"
                    },
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Database subdirectory inside the Railway volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Healthchecks database name.",
                      "defaultValue": "healthchecks"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Healthchecks database user.",
                      "defaultValue": "healthchecks"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated PostgreSQL password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "6c3be130-52c8-412c-a6b2-b0c727cb97af": {
                      "sizeMB": 5000,
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Healthchecks",
      "method": "GET",
      "path": "/api/v3/status/",
      "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-05T00:25:02.197Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_f609f704160749a1bc56",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 73,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "Healthchecks"
  }
}
