{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fa000b63-0d0b-4e3b-bfad-179666803147",
    "slug": "sure",
    "name": "Sure Finance",
    "description": "The personal finance app for everyone",
    "url": "https://railway.com/deploy/sure",
    "upstream": {
      "image": "ghcr.io/we-promise/sure:latest"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "tcp_ports": [
        6379
      ],
      "http": false
    },
    {
      "name": "Sure",
      "source": {
        "image": "ghcr.io/we-promise/sure:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Worker",
      "source": {
        "image": "ghcr.io/we-promise/sure:latest"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "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 Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "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": "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_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "The hostname or private domain where the Redis server is hosted.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "The TCP port Redis listens on for incoming connections (default: 6379).",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "The username used to authenticate with the Redis server",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis using the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "A variable referencing the Redis password used for authentication.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "The actual password or auto-generated secret key for Redis access.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Redis",
      "description": "A long, random secret string used by the application to securely encrypt, hash, and sign sensitive data.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis externally",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_HOST",
      "service": "Sure",
      "description": "The hostname or IP address of the PostgreSQL database server.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "Sure",
      "description": "The network port PostgreSQL is listening on (default is 5432).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "Sure",
      "description": "The full connection URL for the Redis cache instance.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Sure",
      "description": "The name of the PostgreSQL database your app connects to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SELF_HOSTED",
      "service": "Sure",
      "description": "Toggles the hosted features off",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Sure",
      "description": "The username used to authenticate with PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Sure",
      "description": "A secret key used by the app for encryption and signing.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Sure",
      "description": "The password for the PostgreSQL user account.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_HOST",
      "service": "Worker",
      "description": "The hostname or IP address of your PostgreSQL database server.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "Worker",
      "description": "The port number used to connect to the PostgreSQL database (default: 5432).",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "Worker",
      "description": "The connection URL for the Redis instance used for caching or background jobs.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Worker",
      "description": "The name of the PostgreSQL database your app connects to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SELF_HOSTED",
      "service": "Worker",
      "description": "Indicates the app is running on your own infrastructure instead of a managed service.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Worker",
      "description": "The username used to log in to the PostgreSQL database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Worker",
      "description": "A long, random secret string used by the application to securely encrypt, hash, and sign sensitive data.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Worker",
      "description": "The password associated with the PostgreSQL user account.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "sure"
      }
    },
    "cli": "railway deploy --template sure",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fa000b63-0d0b-4e3b-bfad-179666803147",
            "serializedConfig": {
              "services": {
                "1edc72d5-df41-44fa-9f37-a7314dac9281": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "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 Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "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_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "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_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    },
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "1edc72d5-df41-44fa-9f37-a7314dac9281": {
                      "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."
                  }
                },
                "619d543e-792c-417d-bcde-4bb050cbdff5": {
                  "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\""
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "The hostname or private domain where the Redis server is hosted.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "The TCP port Redis listens on for incoming connections (default: 6379).",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "The username used to authenticate with the Redis server",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Connection string for connecting to redis using the private network",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "A variable referencing the Redis password used for authentication.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "The actual password or auto-generated secret key for Redis access.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "A long, random secret string used by the application to securely encrypt, hash, and sign sensitive data.",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "description": "Connection string for connecting to redis externally",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6379": {}
                    }
                  },
                  "volumeMounts": {
                    "619d543e-792c-417d-bcde-4bb050cbdff5": {
                      "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."
                  }
                },
                "a46ece06-693c-4bf1-a3b4-7e2689d2a1fb": {
                  "icon": "https://cdn.discordapp.com/attachments/1397639792748920978/1429888413426782278/Teal_03.png?ex=68fc641b&is=68fb129b&hm=f5323fac2e4d672728ae75f17bab0b98713b8d1df2b0fc44c40621efdc97e3ec&",
                  "name": "Sure",
                  "deploy": {
                    "startCommand": "bundle exec rails server -b 0.0.0.0 -p 3000",
                    "healthcheckPath": "",
                    "preDeployCommand": "bundle exec rails db:prepare"
                  },
                  "source": {
                    "image": "ghcr.io/we-promise/sure:latest"
                  },
                  "variables": {
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "The hostname or IP address of the PostgreSQL database server.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "The network port PostgreSQL is listening on (default is 5432).",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "The full connection URL for the Redis cache instance.",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "The name of the PostgreSQL database your app connects to.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "SELF_HOSTED": {
                      "isOptional": false,
                      "description": "Toggles the hosted features off",
                      "defaultValue": "true"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "The username used to authenticate with PostgreSQL.",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "A secret key used by the app for encryption and signing.",
                      "defaultValue": "${{Redis.SECRET_KEY_BASE}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "The password for the PostgreSQL user account.",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "bbc3522e-35c0-41f6-a6aa-14a5a49f5f1b": {
                  "icon": "https://cdn-icons-png.flaticon.com/512/4490/4490381.png",
                  "name": "Worker",
                  "deploy": {
                    "startCommand": "bundle exec sidekiq",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/we-promise/sure:latest"
                  },
                  "variables": {
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "The hostname or IP address of your PostgreSQL database server.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "The port number used to connect to the PostgreSQL database (default: 5432).",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "The connection URL for the Redis instance used for caching or background jobs.",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "The name of the PostgreSQL database your app connects to.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "SELF_HOSTED": {
                      "isOptional": false,
                      "description": "Indicates the app is running on your own infrastructure instead of a managed service.",
                      "defaultValue": "true"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "The username used to log in to the PostgreSQL database.",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "A long, random secret string used by the application to securely encrypt, hash, and sign sensitive data.",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "The password associated with the PostgreSQL user account.",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-07T23:54:17.958Z",
  "generator_version": "0.1.0"
}
