{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7101c553-9fac-4cd0-b332-1efab34eee5f",
    "slug": "postgis",
    "name": "PostGIS",
    "description": "PostgreSQL DB enabled with PostGIS",
    "url": "https://railway.com/deploy/postgis",
    "upstream": {
      "image": "postgis/postgis:16-master"
    }
  },
  "services": [
    {
      "name": "PostGIS",
      "source": {
        "image": "postgis/postgis:16-master"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "PostGIS",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "PostGIS",
      "description": "Railway private domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "PostGIS",
      "description": "Port on which to listen for connections",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_DB",
      "service": "PostGIS",
      "description": "Default database created when container is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "PostGIS",
      "description": "URL to connect to Postgres database over public networking",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "PostGIS",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "PostGIS",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PRIVATE_URL",
      "service": "PostGIS",
      "description": "URL to connect to Postgres database over private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_INITDB_ARGS",
      "service": "PostGIS",
      "description": "Additional arguments to pass to postgresql initdb, enables SSL",
      "secret": false,
      "strategy": "default",
      "default": "-c ssl=on -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "postgis"
      }
    },
    "cli": "railway deploy --template postgis",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7101c553-9fac-4cd0-b332-1efab34eee5f",
            "serializedConfig": {
              "services": {
                "d0c52569-6c56-4a76-9714-53b9bca07f32": {
                  "name": "PostGIS",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "postgis/postgis:16-master"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway private domain",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port on which to listen for connections",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when container is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database over public networking",
                      "defaultValue": "postgres://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PRIVATE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database over private network",
                      "defaultValue": "postgres://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:${{PGPORT}}/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_INITDB_ARGS": {
                      "isOptional": true,
                      "description": "Additional arguments to pass to postgresql initdb, enables SSL",
                      "defaultValue": "-c ssl=on -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "d0c52569-6c56-4a76-9714-53b9bca07f32": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-12T22:14:39.841Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-12T12:14:57.196Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_71b1a7f809484e0aa3e8",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 77,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "PostGIS"
  }
}
