{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a1f89973-bc7d-4385-9e2b-f893200041e8",
    "slug": "semaphore",
    "name": "Semaphore UI",
    "description": "Web UI for running Ansible, Terraform and Bash automation",
    "url": "https://railway.com/deploy/semaphore",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/semaphore-ui-railway"
    }
  },
  "services": [
    {
      "name": "semaphore",
      "source": {
        "repo": "https://github.com/gridalpha/semaphore-ui-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/semaphore",
      "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": "runner",
      "source": {
        "repo": "https://github.com/gridalpha/semaphore-ui-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/semaphore",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "semaphore",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "SEMAPHORE_DB",
      "service": "semaphore",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SEMAPHORE_PORT",
      "service": "semaphore",
      "description": "HTTP listener port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "SEMAPHORE_ADMIN",
      "service": "semaphore",
      "description": "First administrator username",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "SEMAPHORE_DB_HOST",
      "service": "semaphore",
      "description": "Private Postgres hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SEMAPHORE_DB_PASS",
      "service": "semaphore",
      "description": "Postgres password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SEMAPHORE_DB_PORT",
      "service": "semaphore",
      "description": "Postgres port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SEMAPHORE_DB_USER",
      "service": "semaphore",
      "description": "Postgres username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SEMAPHORE_TMP_PATH",
      "service": "semaphore",
      "description": "Repository checkout directory",
      "secret": false,
      "strategy": "default",
      "default": "/tmp/semaphore"
    },
    {
      "key": "SEMAPHORE_WEB_ROOT",
      "service": "semaphore",
      "description": "Public URL, enables secure cookies",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "SEMAPHORE_ADMIN_NAME",
      "service": "semaphore",
      "description": "Administrator display name",
      "secret": false,
      "strategy": "default",
      "default": "Administrator"
    },
    {
      "key": "SEMAPHORE_DB_DIALECT",
      "service": "semaphore",
      "description": "Database driver selection",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SEMAPHORE_ADMIN_EMAIL",
      "service": "semaphore",
      "description": "Administrator email address",
      "secret": false,
      "strategy": "default",
      "default": "admin@localhost"
    },
    {
      "key": "SEMAPHORE_CONFIG_PATH",
      "service": "semaphore",
      "description": "Config directory on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/semaphore/config"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "semaphore",
      "description": "Dockerfile built for this service",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile.server"
    },
    {
      "key": "SEMAPHORE_ADMIN_PASSWORD",
      "service": "semaphore",
      "description": "First administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SEMAPHORE_USE_REMOTE_RUNNER",
      "service": "semaphore",
      "description": "Dispatch every task to runners",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SEMAPHORE_RUNNER_REGISTRATION_TOKEN",
      "service": "semaphore",
      "description": "Shared runner registration token",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "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": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "SEMAPHORE_TMP_PATH",
      "service": "runner",
      "description": "Repository checkout directory",
      "secret": false,
      "strategy": "default",
      "default": "/tmp/semaphore"
    },
    {
      "key": "SEMAPHORE_WEB_ROOT",
      "service": "runner",
      "description": "Private server URL, first-boot safe",
      "secret": false,
      "strategy": "default",
      "default": "http://semaphore.railway.internal:3000"
    },
    {
      "key": "SEMAPHORE_DATA_PATH",
      "service": "runner",
      "description": "Volume holding the runner token",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/semaphore"
    },
    {
      "key": "SEMAPHORE_RUNNER_NAME",
      "service": "runner",
      "description": "Name shown in Admin Runners",
      "secret": false,
      "strategy": "default",
      "default": "railway-runner-1"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "runner",
      "description": "Dockerfile built for this service",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile.runner"
    },
    {
      "key": "SEMAPHORE_RUNNER_ENABLED",
      "service": "runner",
      "description": "Register as an active runner",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SEMAPHORE_RUNNER_EXECUTOR_TYPE",
      "service": "runner",
      "description": "Run tasks as local processes",
      "secret": false,
      "strategy": "default",
      "default": "local"
    },
    {
      "key": "SEMAPHORE_RUNNER_MAX_PARALLEL_TASKS",
      "service": "runner",
      "description": "Concurrent tasks per runner",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "SEMAPHORE_RUNNER_REGISTRATION_TOKEN",
      "service": "runner",
      "description": "Shared runner registration token",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "semaphore"
      }
    },
    "cli": "railway deploy --template semaphore",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a1f89973-bc7d-4385-9e2b-f893200041e8",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "10a6e6e5-4ea0-4191-bdd6-73cbf9d9be56": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/semaphore.svg",
                  "name": "semaphore",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/ping",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/semaphore-ui-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "3000"
                    },
                    "SEMAPHORE_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "SEMAPHORE_PORT": {
                      "isOptional": false,
                      "description": "HTTP listener port",
                      "defaultValue": "3000"
                    },
                    "SEMAPHORE_ADMIN": {
                      "isOptional": false,
                      "description": "First administrator username",
                      "defaultValue": "admin"
                    },
                    "SEMAPHORE_DB_HOST": {
                      "isOptional": false,
                      "description": "Private Postgres hostname",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "SEMAPHORE_DB_PASS": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "SEMAPHORE_DB_PORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "SEMAPHORE_DB_USER": {
                      "isOptional": false,
                      "description": "Postgres username",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "SEMAPHORE_TMP_PATH": {
                      "isOptional": false,
                      "description": "Repository checkout directory",
                      "defaultValue": "/tmp/semaphore"
                    },
                    "SEMAPHORE_WEB_ROOT": {
                      "isOptional": false,
                      "description": "Public URL, enables secure cookies",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "SEMAPHORE_ADMIN_NAME": {
                      "isOptional": false,
                      "description": "Administrator display name",
                      "defaultValue": "Administrator"
                    },
                    "SEMAPHORE_DB_DIALECT": {
                      "isOptional": false,
                      "description": "Database driver selection",
                      "defaultValue": "postgres"
                    },
                    "SEMAPHORE_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Administrator email address",
                      "defaultValue": "admin@localhost"
                    },
                    "SEMAPHORE_CONFIG_PATH": {
                      "isOptional": false,
                      "description": "Config directory on the volume",
                      "defaultValue": "/var/lib/semaphore/config"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile built for this service",
                      "defaultValue": "Dockerfile.server"
                    },
                    "SEMAPHORE_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{SEMAPHORE_ADMIN_PASSWORD}}"
                    },
                    "SEMAPHORE_USE_REMOTE_RUNNER": {
                      "isOptional": false,
                      "description": "Dispatch every task to runners",
                      "defaultValue": "true"
                    },
                    "SEMAPHORE_RUNNER_REGISTRATION_TOKEN": {
                      "isOptional": false,
                      "description": "Shared runner registration token",
                      "defaultValue": "{{SEMAPHORE_RUNNER_REGISTRATION_TOKEN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "10a6e6e5-4ea0-4191-bdd6-73cbf9d9be56": {
                      "mountPath": "/var/lib/semaphore"
                    }
                  }
                },
                "23864269-ca6c-4096-a86d-1a9057fb7225": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "23864269-ca6c-4096-a86d-1a9057fb7225": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "4a12b646-5520-45c8-960b-bdf1d01ba032": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/semaphore.svg",
                  "name": "runner",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/semaphore-ui-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "SEMAPHORE_TMP_PATH": {
                      "isOptional": false,
                      "description": "Repository checkout directory",
                      "defaultValue": "/tmp/semaphore"
                    },
                    "SEMAPHORE_WEB_ROOT": {
                      "isOptional": false,
                      "description": "Private server URL, first-boot safe",
                      "defaultValue": "http://semaphore.railway.internal:3000"
                    },
                    "SEMAPHORE_DATA_PATH": {
                      "isOptional": false,
                      "description": "Volume holding the runner token",
                      "defaultValue": "/var/lib/semaphore"
                    },
                    "SEMAPHORE_RUNNER_NAME": {
                      "isOptional": false,
                      "description": "Name shown in Admin Runners",
                      "defaultValue": "railway-runner-1"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile built for this service",
                      "defaultValue": "Dockerfile.runner"
                    },
                    "SEMAPHORE_RUNNER_ENABLED": {
                      "isOptional": false,
                      "description": "Register as an active runner",
                      "defaultValue": "true"
                    },
                    "SEMAPHORE_RUNNER_EXECUTOR_TYPE": {
                      "isOptional": false,
                      "description": "Run tasks as local processes",
                      "defaultValue": "local"
                    },
                    "SEMAPHORE_RUNNER_MAX_PARALLEL_TASKS": {
                      "isOptional": false,
                      "description": "Concurrent tasks per runner",
                      "defaultValue": "5"
                    },
                    "SEMAPHORE_RUNNER_REGISTRATION_TOKEN": {
                      "isOptional": false,
                      "description": "Shared runner registration token",
                      "defaultValue": "${{semaphore.SEMAPHORE_RUNNER_REGISTRATION_TOKEN}}"
                    }
                  },
                  "volumeMounts": {
                    "4a12b646-5520-45c8-960b-bdf1d01ba032": {
                      "mountPath": "/var/lib/semaphore"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "semaphore",
      "method": "GET",
      "path": "/api/ping",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-23T16:14:58.907Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T19:38:24.034Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_09611861bf5c40dcbd49",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 173,
    "typical_build_seconds": 41,
    "typical_start_seconds": 10,
    "slowest_service": "runner"
  }
}
