{
  "manifest_version": "1.0.0",
  "template": {
    "id": "997f372b-8344-4d90-9c98-df958a50bd61",
    "slug": "FgdM-Z",
    "name": "Phase Console",
    "description": "A railway template to deploy Phase Secrets Manager.",
    "url": "https://railway.com/deploy/FgdM-Z",
    "upstream": {
      "image": "phasehq/railway-nginx:latest"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "frontend",
      "source": {
        "image": "phasehq/frontend:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "worker",
      "source": {
        "image": "phasehq/backend:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "backend",
      "source": {
        "image": "phasehq/backend:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "bitnami/redis:7.2.5"
      },
      "needs_volume": true,
      "volume_mount_path": "/bitnami",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "railway-nginx",
      "source": {
        "image": "phasehq/railway-nginx:latest"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "frontend",
      "description": "Port of the Phase frontend service. Default 3000",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "DEBUG",
      "service": "frontend",
      "description": "Debug mode toggle for the Phase frontend service",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "NEXTAUTH_URL",
      "service": "frontend",
      "description": "The URL where the authentication page will be setup by the Phase frontend service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXTAUTH_SECRET",
      "service": "frontend",
      "description": "A 32 byte hex encoded secret key for the Phase frontend service. Please generate locally on your machine using `openssl rand -hex 32`",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BACKEND_API_BASE",
      "service": "frontend",
      "description": "The private or public URL of the Phase backend service to be used internally by the Phsae fontend service. (Mostly during authentication) Example: http://${{backend.RAILWAY_PRIVATE_DOMAIN}}:${{backend.PORT}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "NEXT_TELEMETRY_DISABLED",
      "service": "frontend",
      "description": "Provide a value for NEXT_TELEMETRY_DISABLED.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "NEXT_PUBLIC_BACKEND_API_BASE",
      "service": "frontend",
      "description": "The public URL of the Phase backend service. Example: https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}/service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_NEXTAUTH_PROVIDERS",
      "service": "frontend",
      "description": "A lower-case, comma separated list of SSO auth providers that are to be used to log into to Phase. Example: google,github,gitlab",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DEBUG",
      "service": "worker",
      "description": "Debug mode toggle for the Phase worker job",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "REDIS_HOST",
      "service": "worker",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PORT",
      "service": "worker",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SECRET_KEY",
      "service": "worker",
      "description": "A 32 byte hex encoded secret key for the Phase worker job. This must be the same as Phase backends's SECRET_KEY. Example: ${{backend.SECRET_KEY}}",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOWED_HOSTS",
      "service": "worker",
      "description": "A comma separated list of hosts from which it's permitted to access the Phase backend service, publicly or privately. Should be the same as Phase backend's ALLOWED_HOSTS. Example: ${{backend.ALLOWED_HOSTS}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_HOST",
      "service": "worker",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_NAME",
      "service": "worker",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_PORT",
      "service": "worker",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_USER",
      "service": "worker",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SERVER_SECRET",
      "service": "worker",
      "description": "A 32 byte hex encoded secret key for the Phase worker job. This must be the same as Phase backends's SERVER_SECRET. Example: ${{backend.SERVER_SECRET}}",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "worker",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOWED_ORIGINS",
      "service": "worker",
      "description": "The URLs which are allowed to access the Phase backend service. Example: ${{backend.ALLOWED_ORIGINS}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_PASSWORD",
      "service": "worker",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "backend",
      "description": "Port of the Phase backend service. Default 8000",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "DEBUG",
      "service": "backend",
      "description": "Debug mode toggle for the Phase backend service",
      "secret": false,
      "strategy": "default",
      "default": "False"
    },
    {
      "key": "REDIS_HOST",
      "service": "backend",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PORT",
      "service": "backend",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SECRET_KEY",
      "service": "backend",
      "description": "A 32 byte hex encoded secret key for the Phase Backend service. Please generate locally on your machine using `openssl rand -hex 32`",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ALLOWED_HOSTS",
      "service": "backend",
      "description": "A comma separated list of hosts from which it's permitted to access the Phase backend service, publicly or privately. Note: Please make sure to pass `healthcheck.railway.app` else the health checks will fail.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_HOST",
      "service": "backend",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_NAME",
      "service": "backend",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_PORT",
      "service": "backend",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_USER",
      "service": "backend",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SERVER_SECRET",
      "service": "backend",
      "description": "A 32 byte hex encoded server secret key for the Phase Backend service. Please generate locally on your machine using `openssl rand -hex 32`",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "backend",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ALLOWED_ORIGINS",
      "service": "backend",
      "description": "The URLs which are allowed to access the Phase backend service. Example: https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_PASSWORD",
      "service": "backend",
      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "OAUTH_REDIRECT_URI",
      "service": "backend",
      "description": "The URL to which to redirect to after an OAuth authentication transaction. Example: https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SESSION_COOKIE_DOMAIN",
      "service": "backend",
      "description": "The domain to which session cookies are assigned by the Phase backend service. Example: ${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Provide a value for REDISHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Provide a value for REDISPORT.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Provide a value for REDISUSER.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Provide a value for REDISPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Generate a secure random redis password using: `openssl rand -hex 32`",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Redis",
      "description": "Provide a value for RAILWAY_RUN_UID.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Provide a value for REDIS_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_RDB_POLICY",
      "service": "Redis",
      "description": "Provide a value for REDIS_RDB_POLICY.",
      "secret": false,
      "strategy": "default",
      "default": "3600#1 300#100 60#10000"
    },
    {
      "key": "REDIS_AOF_ENABLED",
      "service": "Redis",
      "description": "Provide a value for REDIS_AOF_ENABLED.",
      "secret": false,
      "strategy": "default",
      "default": "no"
    },
    {
      "key": "RAILWAY_RUN_AS_ROOT",
      "service": "Redis",
      "description": "Provide a value for RAILWAY_RUN_AS_ROOT.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Provide a value for PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Provide a value for PGHOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Provide a value for PGPORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Provide a value for PGUSER.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Provide a value for PGDATABASE.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Provide a value for PGPASSWORD.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_DB.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_USER.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Provide a value for SSL_CERT_DAYS.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Please generate a secure Postgresql password using: `openssl rand -hex 32`",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Provide a value for DATABASE_PUBLIC_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BACKEND_HOST",
      "service": "railway-nginx",
      "description": "Private hostname of the Phase backend service. Example:http://${{backend.RAILWAY_PRIVATE_DOMAIN}}:${{backend.PORT}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ALLOWED_HOSTS",
      "service": "railway-nginx",
      "description": "Provide a value for ALLOWED_HOSTS.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "FRONTEND_HOST",
      "service": "railway-nginx",
      "description": "Private hostname of the Phase frontend service. Example: http://${{frontend.RAILWAY_PRIVATE_DOMAIN}}:${{frontend.PORT}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "FgdM-Z"
      }
    },
    "cli": "railway deploy --template FgdM-Z",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "997f372b-8344-4d90-9c98-df958a50bd61",
            "serializedConfig": {
              "services": {
                "0d56339b-6843-485b-b01b-642c074db521": {
                  "icon": null,
                  "name": "frontend",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health"
                  },
                  "source": {
                    "image": "phasehq/frontend:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the Phase frontend service. Default 3000",
                      "defaultValue": "3000"
                    },
                    "DEBUG": {
                      "isOptional": false,
                      "description": "Debug mode toggle for the Phase frontend service",
                      "defaultValue": "False"
                    },
                    "NEXTAUTH_URL": {
                      "isOptional": false,
                      "description": "The URL where the authentication page will be setup by the Phase frontend service.",
                      "defaultValue": "https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXTAUTH_SECRET": {
                      "isOptional": false,
                      "description": "A 32 byte hex encoded secret key for the Phase frontend service. Please generate locally on your machine using `openssl rand -hex 32`",
                      "defaultValue": "{{NEXTAUTH_SECRET}}"
                    },
                    "BACKEND_API_BASE": {
                      "isOptional": false,
                      "description": "The private or public URL of the Phase backend service to be used internally by the Phsae fontend service. (Mostly during authentication) Example: http://${{backend.RAILWAY_PRIVATE_DOMAIN}}:${{backend.PORT}}",
                      "defaultValue": "http://${{backend.RAILWAY_PRIVATE_DOMAIN}}:${{backend.PORT}}"
                    },
                    "GITHUB_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#git-hub-sso",
                      "defaultValue": ""
                    },
                    "GITLAB_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#git-lab-sso",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_ID": {
                      "isOptional": true,
                      "description": "https://docs.phase.dev/self-hosting/configuration/envars#google-sso",
                      "defaultValue": ""
                    },
                    "GITHUB_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#git-hub-sso",
                      "defaultValue": ""
                    },
                    "GITLAB_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#git-lab-sso",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "https://docs.phase.dev/self-hosting/configuration/envars#google-sso",
                      "defaultValue": ""
                    },
                    "NEXT_TELEMETRY_DISABLED": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": "1"
                    },
                    "NEXT_PUBLIC_BACKEND_API_BASE": {
                      "isOptional": false,
                      "description": "The public URL of the Phase backend service. Example: https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}/service",
                      "defaultValue": "https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}/service"
                    },
                    "NEXT_PUBLIC_NEXTAUTH_PROVIDERS": {
                      "isOptional": false,
                      "description": "A lower-case, comma separated list of SSO auth providers that are to be used to log into to Phase. Example: google,github,gitlab",
                      "defaultValue": "{{NEXT_PUBLIC_NEXTAUTH_PROVIDERS}}"
                    },
                    "NEXT_PUBLIC_GITHUB_INTEGRATION_CLIENT_ID": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    }
                  }
                },
                "3cb4c5fb-dcad-49ec-9ebc-5b74977b38ab": {
                  "icon": null,
                  "name": "worker",
                  "deploy": {
                    "startCommand": "python manage.py rqworker default",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "phasehq/backend:latest"
                  },
                  "variables": {
                    "DEBUG": {
                      "isOptional": false,
                      "description": "Debug mode toggle for the Phase worker job",
                      "defaultValue": "False"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "A 32 byte hex encoded secret key for the Phase worker job. This must be the same as Phase backends's SECRET_KEY. Example: ${{backend.SECRET_KEY}}",
                      "defaultValue": "${{backend.SECRET_KEY}}"
                    },
                    "ALLOWED_HOSTS": {
                      "isOptional": false,
                      "description": "A comma separated list of hosts from which it's permitted to access the Phase backend service, publicly or privately. Should be the same as Phase backend's ALLOWED_HOSTS. Example: ${{backend.ALLOWED_HOSTS}}",
                      "defaultValue": "${{backend.ALLOWED_HOSTS}}"
                    },
                    "DATABASE_HOST": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DATABASE_NAME": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DATABASE_PORT": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DATABASE_USER": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "SERVER_SECRET": {
                      "isOptional": false,
                      "description": "A 32 byte hex encoded secret key for the Phase worker job. This must be the same as Phase backends's SERVER_SECRET. Example: ${{backend.SERVER_SECRET}}",
                      "defaultValue": "${{backend.SERVER_SECRET}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
                      "defaultValue": "${{Redis.REDISPASSWORD}}"
                    },
                    "ALLOWED_ORIGINS": {
                      "isOptional": false,
                      "description": "The URLs which are allowed to access the Phase backend service. Example: ${{backend.ALLOWED_ORIGINS}}",
                      "defaultValue": "${{backend.ALLOWED_ORIGINS}}"
                    },
                    "DATABASE_PASSWORD": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "PHASE_LICENSE_OFFLINE": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    }
                  }
                },
                "6e973292-89c1-427c-958e-29e0df167898": {
                  "icon": null,
                  "name": "backend",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health/"
                  },
                  "source": {
                    "image": "phasehq/backend:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the Phase backend service. Default 8000",
                      "defaultValue": "8000"
                    },
                    "DEBUG": {
                      "isOptional": false,
                      "description": "Debug mode toggle for the Phase backend service",
                      "defaultValue": "False"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "A 32 byte hex encoded secret key for the Phase Backend service. Please generate locally on your machine using `openssl rand -hex 32`",
                      "defaultValue": "{{SECRET_KEY}}"
                    },
                    "SMTP_SERVER": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#email-gateway-configuration",
                      "defaultValue": ""
                    },
                    "ALLOWED_HOSTS": {
                      "isOptional": false,
                      "description": "A comma separated list of hosts from which it's permitted to access the Phase backend service, publicly or privately. Note: Please make sure to pass `healthcheck.railway.app` else the health checks will fail.",
                      "defaultValue": "healthcheck.railway.app,${{RAILWAY_PRIVATE_DOMAIN}},${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_HOST": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DATABASE_NAME": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "DATABASE_PORT": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DATABASE_USER": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "SERVER_SECRET": {
                      "isOptional": false,
                      "description": "A 32 byte hex encoded server secret key for the Phase Backend service. Please generate locally on your machine using `openssl rand -hex 32`",
                      "defaultValue": "{{SERVER_SECRET}}"
                    },
                    "SMTP_PASSWORD": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#email-gateway-configuration",
                      "defaultValue": ""
                    },
                    "SMTP_USERNAME": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#email-gateway-configuration",
                      "defaultValue": ""
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#redis-configuration",
                      "defaultValue": "${{Redis.REDISPASSWORD}}"
                    },
                    "ALLOWED_ORIGINS": {
                      "isOptional": false,
                      "description": "The URLs which are allowed to access the Phase backend service. Example: https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}",
                      "defaultValue": "https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "GITHUB_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#git-hub-sso",
                      "defaultValue": ""
                    },
                    "GITLAB_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#git-lab-sso",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#google-sso",
                      "defaultValue": ""
                    },
                    "DATABASE_PASSWORD": {
                      "isOptional": false,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#database-configuration",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "DEFAULT_FROM_EMAIL": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#email-gateway-configuration",
                      "defaultValue": ""
                    },
                    "OAUTH_REDIRECT_URI": {
                      "isOptional": false,
                      "description": "The URL to which to redirect to after an OAuth authentication transaction. Example: https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}",
                      "defaultValue": "https://${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "GITHUB_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#git-hub-sso",
                      "defaultValue": ""
                    },
                    "GITLAB_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#git-lab-sso",
                      "defaultValue": ""
                    },
                    "GOOGLE_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "https://docs.phase.dev/self-hosting/configuration/envars#google-sso",
                      "defaultValue": ""
                    },
                    "PHASE_LICENSE_OFFLINE": {
                      "isOptional": true,
                      "description": "",
                      "defaultValue": ""
                    },
                    "SESSION_COOKIE_DOMAIN": {
                      "isOptional": false,
                      "description": "The domain to which session cookies are assigned by the Phase backend service. Example: ${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}",
                      "defaultValue": "${{railway-nginx.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "GITHUB_INTEGRATION_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#third-party-integrations-configuration",
                      "defaultValue": ""
                    },
                    "GITHUB_INTEGRATION_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "Please refer https://docs.phase.dev/self-hosting/configuration/envars#third-party-integrations-configuration",
                      "defaultValue": ""
                    }
                  }
                },
                "75e00dd1-d543-4fe9-abcb-0ce6ec407f64": {
                  "icon": "https://devicons.railway.app/i/redis.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "bitnami/redis:7.2.5"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generate a secure random redis password using: `openssl rand -hex 32`",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "0"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "REDIS_RDB_POLICY": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "3600#1 300#100 60#10000"
                    },
                    "REDIS_AOF_ENABLED": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "no"
                    },
                    "RAILWAY_RUN_AS_ROOT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "true"
                    }
                  },
                  "volumeMounts": {
                    "75e00dd1-d543-4fe9-abcb-0ce6ec407f64": {
                      "mountPath": "/bitnami"
                    }
                  }
                },
                "792605ef-56db-409f-bc3a-f618311457e9": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Please generate a secure Postgresql password using: `openssl rand -hex 32`",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    }
                  },
                  "volumeMounts": {
                    "792605ef-56db-409f-bc3a-f618311457e9": {
                      "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."
                  }
                },
                "c7fd0342-a21f-4d2f-94eb-3b2d02471bfc": {
                  "icon": null,
                  "name": "railway-nginx",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "phasehq/railway-nginx:latest"
                  },
                  "variables": {
                    "BACKEND_HOST": {
                      "isOptional": false,
                      "description": "Private hostname of the Phase backend service. Example:http://${{backend.RAILWAY_PRIVATE_DOMAIN}}:${{backend.PORT}}",
                      "defaultValue": "http://${{backend.RAILWAY_PRIVATE_DOMAIN}}:${{backend.PORT}}"
                    },
                    "ALLOWED_HOSTS": {
                      "isOptional": false,
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "FRONTEND_HOST": {
                      "isOptional": false,
                      "description": "Private hostname of the Phase frontend service. Example: http://${{frontend.RAILWAY_PRIVATE_DOMAIN}}:${{frontend.PORT}}",
                      "defaultValue": "http://${{frontend.RAILWAY_PRIVATE_DOMAIN}}:${{frontend.PORT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 6,
    "needs_volume": true
  },
  "generated_at": "2026-09-22T22:14:50.114Z",
  "generator_version": "0.1.0"
}
