{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c47725af-3178-4d4c-b87b-2d380bfc3ed7",
    "slug": "celery-or-web-worker-and-scheduler-as-th",
    "name": "Celery | Web, Worker and Scheduler as Three Services",
    "description": "Web, worker and scheduler wired up: Celery on Redis, outcomes in Postgres.",
    "url": "https://railway.com/deploy/celery-or-web-worker-and-scheduler-as-th",
    "upstream": {
      "repo_url": "https://github.com/ak40u/celery-railway-starter"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Worker",
      "source": {
        "repo": "https://github.com/ak40u/celery-railway-starter"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Scheduler",
      "source": {
        "repo": "https://github.com/ak40u/celery-railway-starter"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "API",
      "source": {
        "repo": "https://github.com/ak40u/celery-railway-starter"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.6.5-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "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
    }
  ],
  "required_inputs": [
    {
      "key": "REDIS_URL",
      "service": "Worker",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Worker",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "Scheduler",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Scheduler",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "API",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "API_TOKEN",
      "service": "API",
      "description": "Provide a value for API_TOKEN.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "REDIS_URL",
      "service": "API",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "API",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Provide a value for REDIS_PASSWORD.",
      "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": "ENABLE_ALPINE_PRIVATE_NETWORKING",
      "service": "Redis",
      "description": "Provide a value for ENABLE_ALPINE_PRIVATE_NETWORKING.",
      "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": "PGPORT",
      "service": "Postgres",
      "description": "Provide a value for PGPORT.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "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": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "celery-or-web-worker-and-scheduler-as-th"
      }
    },
    "cli": "railway deploy --template celery-or-web-worker-and-scheduler-as-th",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c47725af-3178-4d4c-b87b-2d380bfc3ed7",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3e32bb52-6436-4d4a-83ce-382d4e0941b4": {
                  "icon": null,
                  "name": "Worker",
                  "deploy": {
                    "startCommand": "celery -A app.tasks.celery worker --loglevel=info --concurrency=2",
                    "healthcheckPath": "",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/ak40u/celery-railway-starter",
                    "rootDirectory": null
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    }
                  }
                },
                "42181cdf-e117-4a82-9877-0d1f7fd289d4": {
                  "icon": null,
                  "name": "Scheduler",
                  "deploy": {
                    "startCommand": "celery -A app.tasks.celery beat --loglevel=info",
                    "healthcheckPath": "",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/ak40u/celery-railway-starter",
                    "rootDirectory": null
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    }
                  }
                },
                "6da2ece0-4d47-4aaf-8a1e-eb0d1a31df38": {
                  "icon": null,
                  "name": "API",
                  "deploy": {
                    "startCommand": "uvicorn app.web:app --host 0.0.0.0 --port 8080",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/ak40u/celery-railway-starter",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "defaultValue": "8080"
                    },
                    "API_TOKEN": {
                      "isOptional": false,
                      "defaultValue": "{{API_TOKEN}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "70eefe59-e548-406b-af10-015dc83cb1c2": {
                  "icon": null,
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'redis-server --requirepass \"$REDIS_PASSWORD\" --appendonly yes --bind 0.0.0.0 :: --protected-mode no'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.6.5-alpine"
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "defaultValue": "0"
                    },
                    "ENABLE_ALPINE_PRIVATE_NETWORKING": {
                      "isOptional": false,
                      "defaultValue": "true"
                    }
                  },
                  "volumeMounts": {
                    "70eefe59-e548-406b-af10-015dc83cb1c2": {
                      "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."
                  }
                },
                "8e797bff-8983-41da-b7ee-459f05f32d70": {
                  "icon": null,
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "defaultValue": "5432"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "postgresql://postgres:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{POSTGRES_DB}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "8e797bff-8983-41da-b7ee-459f05f32d70": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "API",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-05T23:54:15.610Z",
  "generator_version": "0.1.0"
}
