{
  "manifest_version": "1.0.0",
  "template": {
    "id": "79959043-b76c-4987-9a50-92a5730e0b96",
    "slug": "_mFlP4",
    "name": "Maybe",
    "description": "The OS for your personal finances",
    "url": "https://railway.com/deploy/_mFlP4",
    "upstream": {
      "image": "ghcr.io/maybe-finance/maybe:latest"
    }
  },
  "services": [
    {
      "name": "Maybe",
      "source": {
        "image": "ghcr.io/maybe-finance/maybe:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/rails/storage",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Maybe",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "DB_HOST",
      "service": "Maybe",
      "description": "Provide a value for DB_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "Maybe",
      "description": "Provide a value for DB_PORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "APP_DOMAIN",
      "service": "Maybe",
      "description": "Provide a value for APP_DOMAIN.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SELF_HOSTED",
      "service": "Maybe",
      "description": "Provide a value for SELF_HOSTED.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Maybe",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILS_FORCE_SSL",
      "service": "Maybe",
      "description": "Provide a value for RAILS_FORCE_SSL.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Maybe",
      "description": "Provide a value for SECRET_KEY_BASE.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILS_ASSUME_SSL",
      "service": "Maybe",
      "description": "Provide a value for RAILS_ASSUME_SSL.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Maybe",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GOOD_JOB_EXECUTION_MODE",
      "service": "Maybe",
      "description": "Provide a value for GOOD_JOB_EXECUTION_MODE.",
      "secret": false,
      "strategy": "default",
      "default": "async"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway TCP Proxy Domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPRIVATEHOST",
      "service": "Postgres",
      "description": "Railway Private Domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PRIVATE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "_mFlP4"
      }
    },
    "cli": "railway deploy --template _mFlP4",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "79959043-b76c-4987-9a50-92a5730e0b96",
            "serializedConfig": {
              "services": {
                "96eeec13-5d75-449f-a5a8-2f50804b6ea7": {
                  "icon": "https://maybe.co/assets/icon-maybe-color-ffeec667.svg",
                  "name": "Maybe",
                  "deploy": {
                    "startCommand": "sh -c \"sleep 3 && /rails/bin/docker-entrypoint ./bin/rails server\""
                  },
                  "source": {
                    "image": "ghcr.io/maybe-finance/maybe:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "3000"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.PGPRIVATEHOST}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "5432"
                    },
                    "APP_DOMAIN": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SELF_HOSTED": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "SYNTH_API_KEY": {
                      "isOptional": true,
                      "description": "For stock tickers",
                      "defaultValue": ""
                    },
                    "RAILS_FORCE_SSL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "false"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "RAILS_ASSUME_SSL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "false"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "GOOD_JOB_EXECUTION_MODE": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "async"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "96eeec13-5d75-449f-a5a8-2f50804b6ea7": {
                      "mountPath": "/rails/storage"
                    }
                  }
                },
                "f082be9b-1fd0-420e-b0ad-025585ff70d1": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {},
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:latest"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway TCP Proxy Domain",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "PGPRIVATEHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "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",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "f082be9b-1fd0-420e-b0ad-025585ff70d1": {
                      "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": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T22:14:50.114Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T13:14:26.447Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_2b924d3138164f1ba1ea",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 70,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Maybe"
  }
}
