{
  "manifest_version": "1.0.0",
  "template": {
    "id": "063d2805-0bcd-4802-8ff0-645e8fca310f",
    "slug": "blnk-railway-1",
    "name": "blnk-railway",
    "description": "One-click deployment of Blnk in Railway",
    "url": "https://railway.com/deploy/blnk-railway-1",
    "upstream": {
      "image": "jerryenebeli/blnk:0.12.2"
    }
  },
  "services": [
    {
      "name": "blnk-server",
      "source": {
        "image": "jerryenebeli/blnk:0.12.2"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "typesense",
      "source": {
        "image": "typesense/typesense:29.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "blnk-worker",
      "source": {
        "image": "jerryenebeli/blnk:0.12.2"
      },
      "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
    },
    {
      "name": "redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "BLNK_REDIS_DNS",
      "service": "blnk-server",
      "description": "\tThe Redis connection string that specifies the host, port, and authentication details for your Redis instance. ",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BLNK_SERVER_PORT",
      "service": "blnk-server",
      "description": "The network port on which the server listens for incoming connections.",
      "secret": false,
      "strategy": "default",
      "default": "5001"
    },
    {
      "key": "BLNK_TYPESENSE_DNS",
      "service": "blnk-server",
      "description": "The URL endpoint for your TypeSense server instance.",
      "secret": false,
      "strategy": "default",
      "default": "http://typesense:8080"
    },
    {
      "key": "BLNK_TYPESENSE_KEY",
      "service": "blnk-server",
      "description": "The URL endpoint for your TypeSense server instance.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BLNK_DATA_SOURCE_DNS",
      "service": "blnk-server",
      "description": "The database connection string that specifies the location, credentials, and parameters for connecting to your database. ",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "typesense",
      "description": "Where the TypeSense service listens on",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TYPESENSE_API_KEY",
      "service": "typesense",
      "description": "The API key used for authenticating requests to your TypeSense instance. ",
      "secret": true,
      "strategy": "default",
      "default": "blnk-api-key"
    },
    {
      "key": "BLNK_REDIS_DNS",
      "service": "blnk-worker",
      "description": "The Redis connection string that specifies the host, port, and authentication details for your Redis instance. ",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BLNK_SERVER_PORT",
      "service": "blnk-worker",
      "description": "The network port on which the server listens for incoming connections.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BLNK_TYPESENSE_DNS",
      "service": "blnk-worker",
      "description": "\tThe URL endpoint for your TypeSense server instance.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BLNK_TYPESENSE_KEY",
      "service": "blnk-worker",
      "description": "The API key used for authenticating requests to your TypeSense instance. ",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BLNK_DATA_SOURCE_DNS",
      "service": "blnk-worker",
      "description": "The database connection string that specifies the location, credentials, and parameters for connecting to your database. ",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Filesystem path where Postgres stores its data files.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "postgres",
      "description": "Internal hostname for the Postgres service inside Railway’s private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGUSER",
      "service": "postgres",
      "description": "Username used to authenticate with the Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "postgres",
      "description": "Name of the Postgres database your app connects to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "postgres",
      "description": "Password for the Postgres user.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Default database name created when the Postgres service starts.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "DATABASE_URL",
      "service": "postgres",
      "description": "Full Postgres connection string for internal Railway-to-Railway access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Primary Postgres user created for the database service.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "postgres",
      "description": "Number of days before generated SSL certificates expire.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Generated root password used by the Postgres service itself.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "postgres",
      "description": "Postgres connection string exposed via Railway’s TCP proxy for external access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "postgres",
      "description": "Grace period Railway allows for in-flight requests before shutting down a deployment.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISHOST",
      "service": "redis",
      "description": "Internal hostname for the Redis service inside Railway’s private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "redis",
      "description": "Port Redis listens on. Usually 6379.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISUSER",
      "service": "redis",
      "description": "Username used to authenticate with Redis.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "redis",
      "description": "Full Redis connection string for internal Railway-to-Railway access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "redis",
      "description": "Password used by clients to authenticate with Redis.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis",
      "description": "Generated password used by the Redis service itself.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "redis",
      "description": "Redis connection string exposed via Railway’s TCP proxy for external access.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "blnk-railway-1"
      }
    },
    "cli": "railway deploy --template blnk-railway-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "063d2805-0bcd-4802-8ff0-645e8fca310f",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3cc12428-0a5b-40ff-b2b9-670dd353ce30": {
                  "icon": "https://userimg-assets.customeriomail.com/images/client-env-164097/1738821987575_blnk-logo-signup_01JKCXVWDHAKCVAT9ZDTW3X1KR.png",
                  "name": "blnk-server",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "",
                    "preDeployCommand": [
                      "blnk migrate up"
                    ],
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "jerryenebeli/blnk:0.12.2"
                  },
                  "variables": {
                    "BLNK_REDIS_DNS": {
                      "isOptional": false,
                      "description": "\tThe Redis connection string that specifies the host, port, and authentication details for your Redis instance. ",
                      "defaultValue": "${{redis.REDIS_URL}}"
                    },
                    "BLNK_SERVER_PORT": {
                      "isOptional": false,
                      "description": "The network port on which the server listens for incoming connections.",
                      "defaultValue": "5001"
                    },
                    "BLNK_TYPESENSE_DNS": {
                      "isOptional": false,
                      "description": "The URL endpoint for your TypeSense server instance.",
                      "defaultValue": "http://typesense:8080"
                    },
                    "BLNK_TYPESENSE_KEY": {
                      "isOptional": false,
                      "description": "The URL endpoint for your TypeSense server instance.",
                      "defaultValue": "${{typesense.TYPESENSE_API_KEY}}"
                    },
                    "BLNK_DATA_SOURCE_DNS": {
                      "isOptional": false,
                      "description": "The database connection string that specifies the location, credentials, and parameters for connecting to your database. ",
                      "defaultValue": "${{postgres.DATABASE_URL}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:5001": {
                        "port": 5001
                      }
                    }
                  }
                },
                "42c9426f-a27f-4cc1-a7b0-f9897781960a": {
                  "icon": "https://files.svgcdn.io/logos/typesense-icon.png",
                  "name": "typesense",
                  "deploy": {
                    "startCommand": "sh -lc 'exec /opt/typesense-server --data-dir=/data --api-key=\"$TYPESENSE_API_KEY\" --listen-port=\"$PORT\" --thread-pool-size=4'",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "typesense/typesense:29.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Where the TypeSense service listens on",
                      "defaultValue": "8080"
                    },
                    "TYPESENSE_API_KEY": {
                      "isOptional": false,
                      "description": "The API key used for authenticating requests to your TypeSense instance. ",
                      "defaultValue": "blnk-api-key"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "42c9426f-a27f-4cc1-a7b0-f9897781960a": {
                      "mountPath": "/data"
                    }
                  }
                },
                "77499de3-c97d-4e8a-bca7-d89fdba85fe1": {
                  "icon": "https://userimg-assets.customeriomail.com/images/client-env-164097/1738821987575_blnk-logo-signup_01JKCXVWDHAKCVAT9ZDTW3X1KR.png",
                  "name": "blnk-worker",
                  "deploy": {
                    "startCommand": "blnk workers",
                    "healthcheckPath": "",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "jerryenebeli/blnk:0.12.2"
                  },
                  "variables": {
                    "BLNK_REDIS_DNS": {
                      "isOptional": false,
                      "description": "The Redis connection string that specifies the host, port, and authentication details for your Redis instance. ",
                      "defaultValue": "${{redis.REDIS_URL}}"
                    },
                    "BLNK_SERVER_PORT": {
                      "isOptional": false,
                      "description": "The network port on which the server listens for incoming connections.",
                      "defaultValue": "${{blnk-server.BLNK_SERVER_PORT}}"
                    },
                    "BLNK_TYPESENSE_DNS": {
                      "isOptional": false,
                      "description": "\tThe URL endpoint for your TypeSense server instance.",
                      "defaultValue": "${{blnk-server.BLNK_TYPESENSE_DNS}}"
                    },
                    "BLNK_TYPESENSE_KEY": {
                      "isOptional": false,
                      "description": "The API key used for authenticating requests to your TypeSense instance. ",
                      "defaultValue": "${{typesense.TYPESENSE_API_KEY}}"
                    },
                    "BLNK_DATA_SOURCE_DNS": {
                      "isOptional": false,
                      "description": "The database connection string that specifies the location, credentials, and parameters for connecting to your database. ",
                      "defaultValue": "${{postgres.DATABASE_URL}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "af247478-e263-445e-9c32-55135e63011e": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Filesystem path where Postgres stores its data files.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for the Postgres service inside Railway’s private network.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": true,
                      "description": "Where the database service listens on",
                      "defaultValue": ""
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Username used to authenticate with the Postgres database.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Name of the Postgres database your app connects to.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for the Postgres user.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database name created when the Postgres service starts.",
                      "defaultValue": "postgres"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Full Postgres connection string for internal Railway-to-Railway access.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Primary Postgres user created for the database service.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Number of days before generated SSL certificates expire.",
                      "defaultValue": "${{postgres.SSL_CERT_DAYS}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated root password used by the Postgres service itself.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string exposed via Railway’s TCP proxy for external access.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period Railway allows for in-flight requests before shutting down a deployment.",
                      "defaultValue": "${{postgres.RAILWAY_DEPLOYMENT_DRAINING_SECONDS}}"
                    }
                  },
                  "volumeMounts": {
                    "af247478-e263-445e-9c32-55135e63011e": {
                      "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."
                  }
                },
                "ff31be19-e499-4702-b9e3-d1859a4c2692": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for the Redis service inside Railway’s private network.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Port Redis listens on. Usually 6379.",
                      "defaultValue": "${{redis.REDISPORT}}"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Username used to authenticate with Redis.",
                      "defaultValue": "${{redis.REDISUSER}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Full Redis connection string for internal Railway-to-Railway access.",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Password used by clients to authenticate with Redis.",
                      "defaultValue": "${{redis.REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password used by the Redis service itself.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Redis connection string exposed via Railway’s TCP proxy for external access.",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "ff31be19-e499-4702-b9e3-d1859a4c2692": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "typesense",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-18T14:00:38.478Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_a3463a20145443058e29",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 101,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "blnk-worker"
  }
}
