{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e347c93a-5165-4486-9611-7343c04bf0e0",
    "slug": "htmx-go-postgresql-starter-kit",
    "name": "HTMX + Echo + Go + PostgreSQL - Starter Kit",
    "description": "HTMX + Echo + Go + PostgreSQL starter with one-click deploy.",
    "url": "https://railway.com/deploy/htmx-go-postgresql-starter-kit",
    "upstream": {
      "repo_url": "https://github.com/atoolz/railway-htmx-go-templ-echo-pg"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "web",
      "source": {
        "repo": "https://github.com/atoolz/railway-htmx-go-templ-echo-pg"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "DATABASE_URL",
      "service": "web",
      "description": "PostgreSQL connection string for the application",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Directory where PostgreSQL stores its data files",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Internal hostname for PostgreSQL service",
      "secret": false,
      "strategy": "default",
      "default": "postgres.railway.internal"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port PostgreSQL listens on",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "PostgreSQL admin username",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "PostgreSQL admin password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first startup",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User created on first startup",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Number of days SSL certificates are valid",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password for the default PostgreSQL user",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public connection string for external access",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds to wait for connections to drain before shutdown",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "htmx-go-postgresql-starter-kit"
      }
    },
    "cli": "railway deploy --template htmx-go-postgresql-starter-kit",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e347c93a-5165-4486-9611-7343c04bf0e0",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "f1dfb378-7b44-4f9f-9a4c-33702d4d246d": {
                  "icon": "https://raw.githubusercontent.com/atoolz/railway-htmx-go-templ-echo-pg/master/assets/icon.png",
                  "name": "web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/atoolz/railway-htmx-go-templ-echo-pg",
                    "rootDirectory": null
                  },
                  "variables": {
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string for the application",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "f990ea59-effa-44d8-8e73-db02d523cf51": {
                  "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:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Directory where PostgreSQL stores its data files",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for PostgreSQL service",
                      "defaultValue": "postgres.railway.internal"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port PostgreSQL listens on",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "PostgreSQL admin username",
                      "defaultValue": "postgres"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name",
                      "defaultValue": "railway"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "PostgreSQL admin password",
                      "defaultValue": "{{PGPASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first startup",
                      "defaultValue": "railway"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User created on first startup",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Number of days SSL certificates are valid",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the default PostgreSQL user",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public connection string for external access",
                      "defaultValue": "{{DATABASE_PUBLIC_URL}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds to wait for connections to drain before shutdown",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "f990ea59-effa-44d8-8e73-db02d523cf51": {
                      "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": "web",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0"
}
