{
  "manifest_version": "1.0.0",
  "template": {
    "id": "6494111c-fbc8-4e7f-89bb-66d2f7c000f9",
    "slug": "Fb6KUX",
    "name": "Medusajs 2.0 + Storefront (TRIAL)",
    "description": "Full ecommerce solution, manage products, inventory, orders, etc.",
    "url": "https://railway.com/deploy/Fb6KUX",
    "upstream": {
      "repo_url": "https://github.com/rpuls/medusajs-2.0-for-railway-boilerplate"
    }
  },
  "services": [
    {
      "name": "Backend",
      "source": {
        "repo": "https://github.com/rpuls/medusajs-2.0-for-railway-boilerplate"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/.medusa/server/static",
      "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
    },
    {
      "name": "Storefront",
      "source": {
        "repo": "https://github.com/rpuls/medusajs-2.0-for-railway-boilerplate"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "NODE_ENV",
      "service": "Backend",
      "description": "Provide a value for NODE_ENV.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "AUTH_CORS",
      "service": "Backend",
      "description": "Provide a value for AUTH_CORS.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "REDIS_URL",
      "service": "Backend",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_CORS",
      "service": "Backend",
      "description": "Provide a value for ADMIN_CORS.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "JWT_SECRET",
      "service": "Backend",
      "description": "Provide a value for JWT_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STORE_CORS",
      "service": "Backend",
      "description": "Provide a value for STORE_CORS.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "STORE_NAME",
      "service": "Backend",
      "description": "Change this value to your own stores name. This will be shown in the storefront, and on emails to customers.",
      "secret": false,
      "strategy": "default",
      "default": "Demo Store"
    },
    {
      "key": "DATABASE_URL",
      "service": "Backend",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_URL",
      "service": "Backend",
      "description": "Provide a value for POSTGRES_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "COOKIE_SECRET",
      "service": "Backend",
      "description": "Provide a value for COOKIE_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEDUSA_ADMIN_EMAIL",
      "service": "Backend",
      "description": "chage to your own email",
      "secret": false,
      "strategy": "default",
      "default": "admin@yourmail.com"
    },
    {
      "key": "MEDUSA_ADMIN_PASSWORD",
      "service": "Backend",
      "description": "automatic strong password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "TEMPLATE_REPORTER_URL",
      "service": "Backend",
      "description": "Provide a value for TEMPLATE_REPORTER_URL.",
      "secret": false,
      "strategy": "default",
      "default": "https://railway-template-reporter-production.up.railway.app"
    },
    {
      "key": "RAILWAY_PUBLIC_DOMAIN_VALUE",
      "service": "Backend",
      "description": "Provide a value for RAILWAY_PUBLIC_DOMAIN_VALUE.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "Backend",
      "description": "Provide a value for RAILWAY_HEALTHCHECK_TIMEOUT_SEC.",
      "secret": false,
      "strategy": "default",
      "default": "720"
    },
    {
      "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"
    },
    {
      "key": "NEXT_PUBLIC_BASE_URL",
      "service": "Storefront",
      "description": "Provide a value for NEXT_PUBLIC_BASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_STORE_NAME",
      "service": "Storefront",
      "description": "Provide a value for NEXT_PUBLIC_STORE_NAME.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_MEDUSA_BACKEND_URL",
      "service": "Storefront",
      "description": "Provide a value for NEXT_PUBLIC_MEDUSA_BACKEND_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "Fb6KUX"
      }
    },
    "cli": "railway deploy --template Fb6KUX",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "6494111c-fbc8-4e7f-89bb-66d2f7c000f9",
            "serializedConfig": {
              "services": {
                "07b146bd-069c-4dc3-bf44-94c084d040f6": {
                  "icon": "https://res.cloudinary.com/hczpmiapo/image/upload/v1788182676/service-backend-dark-256_iypexw.png",
                  "name": "Backend",
                  "build": {},
                  "deploy": {
                    "startCommand": "",
                    "healthcheckPath": "/health"
                  },
                  "source": {
                    "repo": "rpuls/medusajs-2.0-for-railway-boilerplate",
                    "branch": null,
                    "rootDirectory": "/backend"
                  },
                  "variables": {
                    "NODE_ENV": {
                      "defaultValue": "production"
                    },
                    "AUTH_CORS": {
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}},https://${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "ADMIN_CORS": {
                      "isOptional": false,
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}},https://${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "STORE_CORS": {
                      "defaultValue": "${{Storefront.NEXT_PUBLIC_BASE_URL}}"
                    },
                    "STORE_NAME": {
                      "description": "Change this value to your own stores name. This will be shown in the storefront, and on emails to customers.",
                      "defaultValue": "Demo Store"
                    },
                    "RESEND_FROM": {
                      "isOptional": true,
                      "description": "Add to enable automated emails with Resend (info@yourdomain.com)",
                      "defaultValue": ""
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Postgres.DATABASE_PRIVATE_URL}}"
                    },
                    "POSTGRES_URL": {
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "COOKIE_SECRET": {
                      "isOptional": false,
                      "defaultValue": "{{COOKIE_SECRET}}"
                    },
                    "RESEND_API_KEY": {
                      "isOptional": true,
                      "description": "Used to enable automated emailing with Resend",
                      "defaultValue": ""
                    },
                    "STRIPE_API_KEY": {
                      "isOptional": true,
                      "description": "Used to enable credit card payment with Stripe",
                      "defaultValue": ""
                    },
                    "MEDUSA_ADMIN_EMAIL": {
                      "description": "chage to your own email",
                      "defaultValue": "admin@yourmail.com"
                    },
                    "MEDUSA_ADMIN_PASSWORD": {
                      "description": "automatic strong password",
                      "defaultValue": "{{MEDUSA_ADMIN_PASSWORD}}"
                    },
                    "STRIPE_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "Add to enable credit card payment with Stripe",
                      "defaultValue": ""
                    },
                    "TEMPLATE_REPORTER_URL": {
                      "isOptional": true,
                      "defaultValue": "https://railway-template-reporter-production.up.railway.app"
                    },
                    "RAILWAY_PUBLIC_DOMAIN_VALUE": {
                      "isOptional": false,
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "defaultValue": "720"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "07b146bd-069c-4dc3-bf44-94c084d040f6": {
                      "mountPath": "/app/.medusa/server/static"
                    }
                  }
                },
                "8170ff3f-dfa7-431e-90a3-b24c055f81db": {
                  "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": {
                    "8170ff3f-dfa7-431e-90a3-b24c055f81db": {
                      "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."
                  }
                },
                "d84832bf-5b6c-4315-b6d5-3b6fd6eefa04": {
                  "icon": "https://medusajs.com/_next/image/?url=%2Fimages%2Fnextjs-app-logo-3c93cee1.png&w=256&q=75",
                  "name": "Storefront",
                  "build": {},
                  "deploy": {
                    "startCommand": "npm run start",
                    "healthcheckPath": "/api/healthcheck"
                  },
                  "source": {
                    "repo": "rpuls/medusajs-2.0-for-railway-boilerplate",
                    "branch": null,
                    "rootDirectory": "/storefront"
                  },
                  "variables": {
                    "NEXT_PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_STORE_NAME": {
                      "defaultValue": "${{Backend.STORE_NAME}}"
                    },
                    "NEXT_PUBLIC_STRIPE_KEY": {
                      "isOptional": true,
                      "description": "Add to enable credit card payment with Stripe",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_MEDUSA_BACKEND_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Backend.RAILWAY_PUBLIC_DOMAIN_VALUE}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Backend",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-13T04:14:39.446Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-12T07:55:54.730Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_b3b84516e3a4487e9ba1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 380,
    "typical_build_seconds": 288,
    "typical_start_seconds": 11,
    "slowest_service": "Storefront"
  }
}
