{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a4adbdec-2782-46a4-a01d-ecf7cc9d1128",
    "slug": "postgres-x-duckdb",
    "name": "Postgres x DuckDB",
    "description": "Postgres 18 with DuckDB using official duckdb image",
    "url": "https://railway.com/deploy/postgres-x-duckdb",
    "upstream": {
      "image": "ghcr.io/lassejlv/pgduckdb:18"
    }
  },
  "services": [
    {
      "name": "Postgres x DuckDB",
      "source": {
        "image": "ghcr.io/lassejlv/pgduckdb:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres x DuckDB",
      "description": " Filesystem path where PostgreSQL stores its data cluster. Must point to a subdirectory inside the volume mounted at /var/lib/postgresql. Do not change this unless you also move the volume mount — a mismatch means your data will not persist across restarts.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/18/docker"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres x DuckDB",
      "description": "Name of the database created on first boot, and the one where the pg_duckdb extension is installed automatically. Defaults to postgres.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres x DuckDB",
      "description": "Connection string for reaching this database from other services in the same Railway project, over the private network. Reference it from your app as ${{Postgres x DuckDB.DATABASE_URL}} rather than copying the value — it is built automatically from the user, password, and database name above.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres x DuckDB",
      "description": "The superuser account created when the database is first initialized. Leave as postgres unless you have a reason to change it. Cannot be changed after the first deploy without wiping the volume.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres x DuckDB",
      "description": "The password for the superuser above. Generate a strong random value and keep it secret — it grants full access to the database. Cannot be changed here after the first deploy; use ALTER ROLE in SQL instead.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres x DuckDB",
      "description": "Connection string for reaching this database from outside Railway — local psql, a BI tool, or a migration script. Requires the TCP proxy to be enabled, and traffic over it counts toward egress. Prefer DATABASE_URL for service-to-service connections.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_INITDB_ARGS",
      "service": "Postgres x DuckDB",
      "description": " Extra flags passed to initdb the very first time the database is created, such as --auth-host=scram-sha-256 to set password encryption or --locale/--encoding for collation. Ignored on every later boot. Leave as provided unless you need specific locale or auth settings.",
      "secret": false,
      "strategy": "default",
      "default": "--data-checksums --auth-host=scram-sha-256"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "postgres-x-duckdb"
      }
    },
    "cli": "railway deploy --template postgres-x-duckdb",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a4adbdec-2782-46a4-a01d-ecf7cc9d1128",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "55aac122-711b-405f-be5d-2ae484f50986": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres x DuckDB",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/lassejlv/pgduckdb:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": " Filesystem path where PostgreSQL stores its data cluster. Must point to a subdirectory inside the volume mounted at /var/lib/postgresql. Do not change this unless you also move the volume mount — a mismatch means your data will not persist across restarts.",
                      "defaultValue": "/var/lib/postgresql/18/docker"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Name of the database created on first boot, and the one where the pg_duckdb extension is installed automatically. Defaults to postgres.",
                      "defaultValue": "postgres"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Connection string for reaching this database from other services in the same Railway project, over the private network. Reference it from your app as ${{Postgres x DuckDB.DATABASE_URL}} rather than copying the value — it is built automatically from the user, password, and database name above.",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "The superuser account created when the database is first initialized. Leave as postgres unless you have a reason to change it. Cannot be changed after the first deploy without wiping the volume.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "The password for the superuser above. Generate a strong random value and keep it secret — it grants full access to the database. Cannot be changed here after the first deploy; use ALTER ROLE in SQL instead.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Connection string for reaching this database from outside Railway — local psql, a BI tool, or a migration script. Requires the TCP proxy to be enabled, and traffic over it counts toward egress. Prefer DATABASE_URL for service-to-service connections.",
                      "defaultValue": "postgresql://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_INITDB_ARGS": {
                      "isOptional": false,
                      "description": " Extra flags passed to initdb the very first time the database is created, such as --auth-host=scram-sha-256 to set password encryption or --locale/--encoding for collation. Ignored on every later boot. Leave as provided unless you need specific locale or auth settings.",
                      "defaultValue": "--data-checksums --auth-host=scram-sha-256"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    }
                  },
                  "volumeMounts": {
                    "55aac122-711b-405f-be5d-2ae484f50986": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-14T22:14:43.073Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-14T20:18:14.916Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_b4d69d20c73a46029c2a",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 22,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "Postgres x DuckDB"
  }
}
