{
  "manifest_version": "1.0.0",
  "template": {
    "id": "8158caa7-b579-434f-8b9d-14ee462fa822",
    "slug": "medusa-v2-worker-mode",
    "name": "Medusa v2 (Worker Mode)",
    "description": "Medusa v2 with a dedicated background-job worker, search and storefront.",
    "url": "https://railway.com/deploy/medusa-v2-worker-mode",
    "upstream": {
      "repo_url": "https://github.com/rpuls/medusajs-2.0-for-railway-boilerplate"
    }
  },
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Worker",
      "source": {
        "repo": "https://github.com/rpuls/medusajs-2.0-for-railway-boilerplate"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Storefront",
      "source": {
        "repo": "https://github.com/rpuls/medusajs-2.0-for-railway-boilerplate"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Media-proxy",
      "source": {
        "image": "ghcr.io/railwayapp/function-bun:1.3.0"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Backend",
      "source": {
        "repo": "https://github.com/rpuls/medusajs-2.0-for-railway-boilerplate"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "MeiliSearch",
      "source": {
        "image": "getmeili/meilisearch:v1.11.3"
      },
      "needs_volume": true,
      "volume_mount_path": "/meili_data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Railway private domain name for Redis.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Port to connect to Redis.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Default Redis user.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Connection string for Redis over the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Password to connect to Redis, used by the Data panel.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Generated password protecting Redis.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "Worker",
      "description": "Port Medusa binds. Must match the healthcheck probe.",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "NODE_ENV",
      "service": "Worker",
      "description": "Node environment. Keep as production.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "Worker",
      "description": "Redis for the event bus and workflow engine. family=0 lets ioredis resolve Railway's dual-stack DNS.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_BUCKET",
      "service": "Worker",
      "description": "Storage bucket holding product media.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "Worker",
      "description": "Region of the storage bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "JWT_SECRET",
      "service": "Worker",
      "description": "Must match the Backend's JWT secret.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "Worker",
      "description": "S3 API endpoint for the bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_FILE_URL",
      "service": "Worker",
      "description": "Public base URL uploaded files are served from.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "Worker",
      "description": "Postgres connection string.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "COOKIE_SECRET",
      "service": "Worker",
      "description": "Must match the Backend's cookie secret.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEILISEARCH_HOST",
      "service": "Worker",
      "description": "Meilisearch over the private network; indexing traffic never leaves Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "Worker",
      "description": "Access key id for the bucket's S3 API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEDUSA_WORKER_MODE",
      "service": "Worker",
      "description": "Runs scheduled jobs and subscribers only; serves no API traffic.",
      "secret": false,
      "strategy": "default",
      "default": "worker"
    },
    {
      "key": "MEDUSA_DISABLE_ADMIN",
      "service": "Worker",
      "description": "Skips building the Admin dashboard on this instance.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "Worker",
      "description": "Secret key for the bucket's S3 API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEILISEARCH_MASTER_KEY",
      "service": "Worker",
      "description": "Meilisearch root key, used once at boot to mint a scoped admin key.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "Storefront",
      "description": "Port Next.js binds. Must match the healthcheck probe.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "NODE_ENV",
      "service": "Storefront",
      "description": "Node environment. Keep as production.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "MEILISEARCH_API_KEY",
      "service": "Storefront",
      "description": "Used at boot to mint a scoped, search-only Meilisearch key.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXT_PUBLIC_BASE_URL",
      "service": "Storefront",
      "description": "The storefront's own public origin.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_INDEX_NAME",
      "service": "Storefront",
      "description": "Meilisearch index backing product search.",
      "secret": false,
      "strategy": "default",
      "default": "products"
    },
    {
      "key": "NEXT_PUBLIC_MEDIA_HOSTNAME",
      "service": "Storefront",
      "description": "Allowed image host for next/image.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_SEARCH_ENDPOINT",
      "service": "Storefront",
      "description": "Public Meilisearch origin; browsers query it directly.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_MEDUSA_BACKEND_URL",
      "service": "Storefront",
      "description": "Backend the storefront calls from the browser.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "Media-proxy",
      "description": "Port the proxy binds. Must match the healthcheck probe.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "S3_BUCKET",
      "service": "Media-proxy",
      "description": "Storage bucket holding product media.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "Media-proxy",
      "description": "Region of the storage bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "Media-proxy",
      "description": "S3 API endpoint for the bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CACHE_CONTROL",
      "service": "Media-proxy",
      "description": "Cache-Control header sent with served media.",
      "secret": false,
      "strategy": "default",
      "default": "public, max-age=31536000, immutable"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "Media-proxy",
      "description": "Access key id for the bucket's S3 API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "Media-proxy",
      "description": "Secret key for the bucket's S3 API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "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 the 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 the Data panel.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when the image starts.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Connection string used by Medusa over the private network.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to the Postgres database.",
      "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": "Generated password for the Postgres user.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allows Postgres to shut down cleanly.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Backend",
      "description": "Port Medusa binds. Must match the healthcheck probe.",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "NODE_ENV",
      "service": "Backend",
      "description": "Node environment. Keep as production.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "AUTH_CORS",
      "service": "Backend",
      "description": "Origins allowed to call the auth routes.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "REDIS_URL",
      "service": "Backend",
      "description": "Redis for the event bus and workflow engine. family=0 lets ioredis resolve Railway's dual-stack DNS.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_BUCKET",
      "service": "Backend",
      "description": "Storage bucket holding product media.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "Backend",
      "description": "Region of the storage bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_CORS",
      "service": "Backend",
      "description": "Origins allowed to call the Admin API.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "JWT_SECRET",
      "service": "Backend",
      "description": "Generated secret used to sign JWTs. Shared with the Worker.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STORE_CORS",
      "service": "Backend",
      "description": "Storefront origin allowed to call the Store API.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "Backend",
      "description": "S3 API endpoint for the bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_FILE_URL",
      "service": "Backend",
      "description": "Public base URL uploaded files are served from.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "Backend",
      "description": "Postgres connection string.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "COOKIE_SECRET",
      "service": "Backend",
      "description": "Generated secret used to sign session cookies. Shared with the Worker.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEILISEARCH_HOST",
      "service": "Backend",
      "description": "Meilisearch over the private network; indexing traffic never leaves Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "Backend",
      "description": "Access key id for the bucket's S3 API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEDUSA_ADMIN_EMAIL",
      "service": "Backend",
      "description": "Admin login created during first-boot seeding. Change this before deploying.",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "MEDUSA_WORKER_MODE",
      "service": "Backend",
      "description": "Serves HTTP only; background jobs run on the Worker service.",
      "secret": false,
      "strategy": "default",
      "default": "server"
    },
    {
      "key": "MEDUSA_DISABLE_ADMIN",
      "service": "Backend",
      "description": "Keeps the Admin dashboard on this instance.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "Backend",
      "description": "Secret key for the bucket's S3 API.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEDUSA_ADMIN_PASSWORD",
      "service": "Backend",
      "description": "Generated password for the admin user. Only used at seed time.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MEILISEARCH_MASTER_KEY",
      "service": "Backend",
      "description": "Meilisearch root key, used once at boot to mint a scoped admin key.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_PUBLIC_DOMAIN_VALUE",
      "service": "Backend",
      "description": "Public backend URL the Admin dashboard is built against.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "MeiliSearch",
      "description": "Port Meilisearch binds. Must match the healthcheck probe.",
      "secret": false,
      "strategy": "default",
      "default": "7700"
    },
    {
      "key": "MEILI_ENV",
      "service": "MeiliSearch",
      "description": "Production mode; requires a master key.",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "MEILI_DB_PATH",
      "service": "MeiliSearch",
      "description": "Index location on the attached volume.",
      "secret": false,
      "strategy": "default",
      "default": "/meili_data/data.ms"
    },
    {
      "key": "MEILI_HTTP_ADDR",
      "service": "MeiliSearch",
      "description": "Bind address. IPv4 so Railway's healthcheck can reach it.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0:7700"
    },
    {
      "key": "MEILI_MASTER_KEY",
      "service": "MeiliSearch",
      "description": "Generated root key. Backend and Storefront derive scoped keys from it.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEILI_NO_ANALYTICS",
      "service": "MeiliSearch",
      "description": "Disables telemetry sent to Meilisearch's servers.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "MEILI_MAX_INDEXING_MEMORY",
      "service": "MeiliSearch",
      "description": "Caps indexing memory so large catalogs don't OOM the service.",
      "secret": false,
      "strategy": "default",
      "default": "2GiB"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "medusa-v2-worker-mode"
      }
    },
    "cli": "railway deploy --template medusa-v2-worker-mode",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "8158caa7-b579-434f-8b9d-14ee462fa822",
            "serializedConfig": {
              "buckets": {
                "cc6e2255-a203-4e6e-bc84-7af6013808a4": {
                  "name": "Bucket"
                }
              },
              "services": {
                "013ebd10-5554-46d6-a752-8fcbcf67c6b1": {
                  "icon": "https://devicons.railway.com/i/redis.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": "Railway private domain name for Redis.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Redis.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Default Redis user.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Connection string for Redis over the private network.",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to Redis, used by the Data panel.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password protecting Redis.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "013ebd10-5554-46d6-a752-8fcbcf67c6b1": {
                      "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."
                  }
                },
                "19e75196-792e-4434-9a12-e292980a627f": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/medusa-light.svg",
                  "name": "Worker",
                  "deploy": {
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "repo": "rpuls/medusajs-2.0-for-railway-boilerplate",
                    "branch": "master",
                    "rootDirectory": "/backend"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Medusa binds. Must match the healthcheck probe.",
                      "defaultValue": "9000"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Node environment. Keep as production.",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis for the event bus and workflow engine. family=0 lets ioredis resolve Railway's dual-stack DNS.",
                      "defaultValue": "${{Redis.REDIS_URL}}?family=0"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Storage bucket holding product media.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Region of the storage bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Must match the Backend's JWT secret.",
                      "defaultValue": "${{Backend.JWT_SECRET}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "S3 API endpoint for the bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "S3_FILE_URL": {
                      "isOptional": false,
                      "description": "Public base URL uploaded files are served from.",
                      "defaultValue": "https://${{Media-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "COOKIE_SECRET": {
                      "isOptional": false,
                      "description": "Must match the Backend's cookie secret.",
                      "defaultValue": "${{Backend.COOKIE_SECRET}}"
                    },
                    "RESEND_API_KEY": {
                      "isOptional": true,
                      "description": "Resend API key. Enables transactional email together with RESEND_FROM_EMAIL.",
                      "defaultValue": ""
                    },
                    "STRIPE_API_KEY": {
                      "isOptional": true,
                      "description": "Stripe secret key. Enables card payments together with STRIPE_WEBHOOK_SECRET.",
                      "defaultValue": ""
                    },
                    "MEILISEARCH_HOST": {
                      "isOptional": false,
                      "description": "Meilisearch over the private network; indexing traffic never leaves Railway.",
                      "defaultValue": "http://${{MeiliSearch.RAILWAY_PRIVATE_DOMAIN}}:7700"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Access key id for the bucket's S3 API.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "SENDGRID_API_KEY": {
                      "isOptional": true,
                      "description": "SendGrid API key. Alternative to Resend.",
                      "defaultValue": ""
                    },
                    "RESEND_FROM_EMAIL": {
                      "isOptional": true,
                      "description": "From address for Resend email, e.g. store@yourdomain.com.",
                      "defaultValue": ""
                    },
                    "MEDUSA_WORKER_MODE": {
                      "isOptional": false,
                      "description": "Runs scheduled jobs and subscribers only; serves no API traffic.",
                      "defaultValue": "worker"
                    },
                    "SENDGRID_FROM_EMAIL": {
                      "isOptional": true,
                      "description": "From address for SendGrid email.",
                      "defaultValue": ""
                    },
                    "MEDUSA_DISABLE_ADMIN": {
                      "isOptional": false,
                      "description": "Skips building the Admin dashboard on this instance.",
                      "defaultValue": "true"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Secret key for the bucket's S3 API.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    },
                    "STRIPE_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "Stripe webhook signing secret. Required alongside STRIPE_API_KEY.",
                      "defaultValue": ""
                    },
                    "MEILISEARCH_MASTER_KEY": {
                      "isOptional": false,
                      "description": "Meilisearch root key, used once at boot to mint a scoped admin key.",
                      "defaultValue": "${{MeiliSearch.MEILI_MASTER_KEY}}"
                    }
                  }
                },
                "29b0c8e3-3766-49c5-be5e-4daa82ab2d7f": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/medusa-light.svg",
                  "name": "Storefront",
                  "deploy": {
                    "startCommand": "npm run start",
                    "healthcheckPath": "/api/healthcheck",
                    "healthcheckTimeout": 900
                  },
                  "source": {
                    "repo": "rpuls/medusajs-2.0-for-railway-boilerplate",
                    "branch": "master",
                    "rootDirectory": "/storefront"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Next.js binds. Must match the healthcheck probe.",
                      "defaultValue": "3000"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Node environment. Keep as production.",
                      "defaultValue": "production"
                    },
                    "MEILISEARCH_API_KEY": {
                      "isOptional": false,
                      "description": "Used at boot to mint a scoped, search-only Meilisearch key.",
                      "defaultValue": "${{MeiliSearch.MEILI_MASTER_KEY}}"
                    },
                    "NEXT_PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "description": "The storefront's own public origin.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_INDEX_NAME": {
                      "isOptional": false,
                      "description": "Meilisearch index backing product search.",
                      "defaultValue": "products"
                    },
                    "NEXT_PUBLIC_STRIPE_KEY": {
                      "isOptional": true,
                      "description": "Stripe publishable key for the checkout form.",
                      "defaultValue": ""
                    },
                    "NEXT_PUBLIC_MEDIA_HOSTNAME": {
                      "isOptional": false,
                      "description": "Allowed image host for next/image.",
                      "defaultValue": "${{Media-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_SEARCH_ENDPOINT": {
                      "isOptional": false,
                      "description": "Public Meilisearch origin; browsers query it directly.",
                      "defaultValue": "https://${{MeiliSearch.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_MEDUSA_BACKEND_URL": {
                      "isOptional": false,
                      "description": "Backend the storefront calls from the browser.",
                      "defaultValue": "https://${{Backend.RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 3000
                      }
                    }
                  }
                },
                "a58af550-9eec-4c76-8e97-7f42e537387a": {
                  "icon": "https://devicons.railway.app/asdasd",
                  "name": "Media-proxy",
                  "deploy": {
                    "startCommand": "./run.sh aW1wb3J0IHsgczMgfSBmcm9tICJidW4iOwoKY29uc3QgQ0FDSEVfQ09OVFJPTCA9IEJ1bi5lbnYuQ0FDSEVfQ09OVFJPTCB8fCAicHVibGljLCBtYXgtYWdlPTMxNTM2MDAwLCBpbW11dGFibGUiOwoKY29uc3Qgbm90Rm91bmQgPSAoKSA9PiBuZXcgUmVzcG9uc2UoIk5vdCBGb3VuZCIsIHsgc3RhdHVzOiA0MDQgfSk7CgpleHBvcnQgZGVmYXVsdCB7CiAgYXN5bmMgZmV0Y2gocmVxOiBSZXF1ZXN0KTogUHJvbWlzZTxSZXNwb25zZT4gewogICAgY29uc3QgdXJsID0gbmV3IFVSTChyZXEudXJsKTsKCiAgICBpZiAodXJsLnBhdGhuYW1lID09PSAiL3Byb3h5LWhlYWx0aHoiKSB7CiAgICAgIHJldHVybiBuZXcgUmVzcG9uc2UoIm9rIiwgeyBzdGF0dXM6IDIwMCB9KTsKICAgIH0KCiAgICBpZiAocmVxLm1ldGhvZCAhPT0gIkdFVCIgJiYgcmVxLm1ldGhvZCAhPT0gIkhFQUQiKSB7CiAgICAgIHJldHVybiBuZXcgUmVzcG9uc2UoIk1ldGhvZCBOb3QgQWxsb3dlZCIsIHsKICAgICAgICBzdGF0dXM6IDQwNSwKICAgICAgICBoZWFkZXJzOiB7IEFsbG93OiAiR0VULCBIRUFEIiB9LAogICAgICB9KTsKICAgIH0KCiAgICBsZXQga2V5OiBzdHJpbmc7CiAgICB0cnkgewogICAgICBrZXkgPSBkZWNvZGVVUklDb21wb25lbnQodXJsLnBhdGhuYW1lLnNsaWNlKDEpKTsKICAgIH0gY2F0Y2ggewogICAgICByZXR1cm4gbm90Rm91bmQoKTsKICAgIH0KCiAgICBpZiAoIWtleSB8fCBrZXkuaW5jbHVkZXMoIlwwIikgfHwga2V5LmluY2x1ZGVzKCIuLiIpKSByZXR1cm4gbm90Rm91bmQoKTsKCiAgICBjb25zdCBmaWxlID0gczMuZmlsZShrZXkpOwogICAgY29uc3Qgc3RhdCA9IGF3YWl0IGZpbGUuc3RhdCgpLmNhdGNoKCgpID0+IG51bGwpOwogICAgaWYgKCFzdGF0KSByZXR1cm4gbm90Rm91bmQoKTsKCiAgICBjb25zdCBoZWFkZXJzOiBSZWNvcmQ8c3RyaW5nLCBzdHJpbmc+ID0gewogICAgICAiQ29udGVudC1UeXBlIjogc3RhdC50eXBlIHx8ICJhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0iLAogICAgICAiQ29udGVudC1MZW5ndGgiOiBTdHJpbmcoc3RhdC5zaXplKSwKICAgICAgIkNhY2hlLUNvbnRyb2wiOiBDQUNIRV9DT05UUk9MLAogICAgICAiWC1Db250ZW50LVR5cGUtT3B0aW9ucyI6ICJub3NuaWZmIiwKICAgIH07CgogICAgcmV0dXJuIHJlcS5tZXRob2QgPT09ICJIRUFEIgogICAgICA/IG5ldyBSZXNwb25zZShudWxsLCB7IHN0YXR1czogMjAwLCBoZWFkZXJzIH0pCiAgICAgIDogbmV3IFJlc3BvbnNlKGZpbGUuc3RyZWFtKCksIHsgc3RhdHVzOiAyMDAsIGhlYWRlcnMgfSk7CiAgfSwKfTsK",
                    "healthcheckPath": "/proxy-healthz",
                    "healthcheckTimeout": 300
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp/function-bun:1.3.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the proxy binds. Must match the healthcheck probe.",
                      "defaultValue": "8080"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Storage bucket holding product media.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Region of the storage bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "S3 API endpoint for the bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "CACHE_CONTROL": {
                      "isOptional": true,
                      "description": "Cache-Control header sent with served media.",
                      "defaultValue": "public, max-age=31536000, immutable"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Access key id for the bucket's S3 API.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Secret key for the bucket's S3 API.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                },
                "d409be2a-c194-434a-967a-c7a6b8014248": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "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 the 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 the Data panel.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when the image starts.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Connection string used by Medusa over the private network.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to the Postgres database.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the Postgres user.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allows Postgres to shut down cleanly.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "d409be2a-c194-434a-967a-c7a6b8014248": {
                      "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."
                  }
                },
                "e4d67217-cb60-4916-97f8-b6eba6ebd26a": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/medusa-light.svg",
                  "name": "Backend",
                  "deploy": {
                    "healthcheckPath": "/health",
                    "healthcheckTimeout": 900
                  },
                  "source": {
                    "repo": "rpuls/medusajs-2.0-for-railway-boilerplate",
                    "branch": "master",
                    "rootDirectory": "/backend"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Medusa binds. Must match the healthcheck probe.",
                      "defaultValue": "9000"
                    },
                    "NODE_ENV": {
                      "isOptional": false,
                      "description": "Node environment. Keep as production.",
                      "defaultValue": "production"
                    },
                    "AUTH_CORS": {
                      "isOptional": false,
                      "description": "Origins allowed to call the auth routes.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis for the event bus and workflow engine. family=0 lets ioredis resolve Railway's dual-stack DNS.",
                      "defaultValue": "${{Redis.REDIS_URL}}?family=0"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Storage bucket holding product media.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Region of the storage bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "ADMIN_CORS": {
                      "isOptional": false,
                      "description": "Origins allowed to call the Admin API.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Generated secret used to sign JWTs. Shared with the Worker.",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "STORE_CORS": {
                      "isOptional": false,
                      "description": "Storefront origin allowed to call the Store API.",
                      "defaultValue": "${{Storefront.NEXT_PUBLIC_BASE_URL}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "S3 API endpoint for the bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "S3_FILE_URL": {
                      "isOptional": false,
                      "description": "Public base URL uploaded files are served from.",
                      "defaultValue": "https://${{Media-proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "COOKIE_SECRET": {
                      "isOptional": false,
                      "description": "Generated secret used to sign session cookies. Shared with the Worker.",
                      "defaultValue": "{{COOKIE_SECRET}}"
                    },
                    "RESEND_API_KEY": {
                      "isOptional": true,
                      "description": "Resend API key. Enables transactional email together with RESEND_FROM_EMAIL.",
                      "defaultValue": ""
                    },
                    "STRIPE_API_KEY": {
                      "isOptional": true,
                      "description": "Stripe secret key. Enables card payments together with STRIPE_WEBHOOK_SECRET.",
                      "defaultValue": ""
                    },
                    "MEILISEARCH_HOST": {
                      "isOptional": false,
                      "description": "Meilisearch over the private network; indexing traffic never leaves Railway.",
                      "defaultValue": "http://${{MeiliSearch.RAILWAY_PRIVATE_DOMAIN}}:7700"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Access key id for the bucket's S3 API.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "SENDGRID_API_KEY": {
                      "isOptional": true,
                      "description": "SendGrid API key. Alternative to Resend.",
                      "defaultValue": ""
                    },
                    "RESEND_FROM_EMAIL": {
                      "isOptional": true,
                      "description": "From address for Resend email, e.g. store@yourdomain.com.",
                      "defaultValue": ""
                    },
                    "MEDUSA_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Admin login created during first-boot seeding. Change this before deploying.",
                      "defaultValue": "admin@example.com"
                    },
                    "MEDUSA_WORKER_MODE": {
                      "isOptional": false,
                      "description": "Serves HTTP only; background jobs run on the Worker service.",
                      "defaultValue": "server"
                    },
                    "SENDGRID_FROM_EMAIL": {
                      "isOptional": true,
                      "description": "From address for SendGrid email.",
                      "defaultValue": ""
                    },
                    "MEDUSA_DISABLE_ADMIN": {
                      "isOptional": false,
                      "description": "Keeps the Admin dashboard on this instance.",
                      "defaultValue": "false"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Secret key for the bucket's S3 API.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    },
                    "MEDUSA_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the admin user. Only used at seed time.",
                      "defaultValue": "{{MEDUSA_ADMIN_PASSWORD}}"
                    },
                    "STRIPE_WEBHOOK_SECRET": {
                      "isOptional": true,
                      "description": "Stripe webhook signing secret. Required alongside STRIPE_API_KEY.",
                      "defaultValue": ""
                    },
                    "MEILISEARCH_MASTER_KEY": {
                      "isOptional": false,
                      "description": "Meilisearch root key, used once at boot to mint a scoped admin key.",
                      "defaultValue": "${{MeiliSearch.MEILI_MASTER_KEY}}"
                    },
                    "RAILWAY_PUBLIC_DOMAIN_VALUE": {
                      "isOptional": false,
                      "description": "Public backend URL the Admin dashboard is built against.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 9000
                      }
                    }
                  }
                },
                "ea8eb3cb-fe89-4f3c-906b-b8c921e50a92": {
                  "icon": "https://raw.githubusercontent.com/meilisearch/meilisearch/main/assets/logo.svg",
                  "name": "MeiliSearch",
                  "deploy": {
                    "healthcheckPath": "/health",
                    "healthcheckTimeout": 300
                  },
                  "source": {
                    "image": "getmeili/meilisearch:v1.11.3"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Meilisearch binds. Must match the healthcheck probe.",
                      "defaultValue": "7700"
                    },
                    "MEILI_ENV": {
                      "isOptional": false,
                      "description": "Production mode; requires a master key.",
                      "defaultValue": "production"
                    },
                    "MEILI_DB_PATH": {
                      "isOptional": false,
                      "description": "Index location on the attached volume.",
                      "defaultValue": "/meili_data/data.ms"
                    },
                    "MEILI_HTTP_ADDR": {
                      "isOptional": false,
                      "description": "Bind address. IPv4 so Railway's healthcheck can reach it.",
                      "defaultValue": "0.0.0.0:7700"
                    },
                    "MEILI_MASTER_KEY": {
                      "isOptional": false,
                      "description": "Generated root key. Backend and Storefront derive scoped keys from it.",
                      "defaultValue": "{{MEILI_MASTER_KEY}}"
                    },
                    "MEILI_NO_ANALYTICS": {
                      "isOptional": false,
                      "description": "Disables telemetry sent to Meilisearch's servers.",
                      "defaultValue": "true"
                    },
                    "MEILI_MAX_INDEXING_MEMORY": {
                      "isOptional": false,
                      "description": "Caps indexing memory so large catalogs don't OOM the service.",
                      "defaultValue": "2GiB"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 7700
                      }
                    }
                  },
                  "volumeMounts": {
                    "ea8eb3cb-fe89-4f3c-906b-b8c921e50a92": {
                      "mountPath": "/meili_data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Storefront",
      "method": "GET",
      "path": "/api/healthcheck",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 7,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-05T12:26:24.336Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_1b433f2b6c1846619520",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 446,
    "typical_build_seconds": 314,
    "typical_start_seconds": 10,
    "slowest_service": "Storefront"
  }
}
