{
  "manifest_version": "1.0.0",
  "template": {
    "id": "4f6b0423-cb4b-4670-af5b-9a4902e8efbd",
    "slug": "arcticworks-codepeer",
    "name": "ArcticWorks CodePeer",
    "description": "Self-hosted AI code reviewer for GitHub pull requests.",
    "url": "https://railway.com/deploy/arcticworks-codepeer",
    "upstream": {
      "repo_url": "https://github.com/ArcticWorks-Software-Company/arcticworks-codepeer"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "arcticworks-codepeer",
      "source": {
        "repo": "https://github.com/ArcticWorks-Software-Company/arcticworks-codepeer"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "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 Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "arcticworks-codepeer",
      "description": "HTTP port the bot listens on. Leave this at 8080.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "LLM_MODEL",
      "service": "arcticworks-codepeer",
      "description": "Review model served by LLM_BASE_URL, for example deepseek-v4-flash.",
      "secret": false,
      "strategy": "default",
      "default": "deepseek-v4-flash"
    },
    {
      "key": "LOG_LEVEL",
      "service": "arcticworks-codepeer",
      "description": "Log verbosity: debug, info, warn, or error.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "LLM_API_KEY",
      "service": "arcticworks-codepeer",
      "description": "DeepSeek API key. Every pull request review is run through this key.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LLM_TIMEOUT",
      "service": "arcticworks-codepeer",
      "description": "Timeout for a single model call, as a Go duration such as 300s.",
      "secret": false,
      "strategy": "default",
      "default": "300s"
    },
    {
      "key": "DATABASE_URL",
      "service": "arcticworks-codepeer",
      "description": "Postgres connection string, referenced from the Postgres service. Leave this as it is.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LLM_BASE_URL",
      "service": "arcticworks-codepeer",
      "description": "Base URL of the OpenAI-compatible API serving the review model. Defaults to DeepSeek.",
      "secret": false,
      "strategy": "default",
      "default": "https://api.deepseek.com"
    },
    {
      "key": "GITHUB_APP_ID",
      "service": "arcticworks-codepeer",
      "description": "App ID from your GitHub App's settings page.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "QUEUE_WORKERS",
      "service": "arcticworks-codepeer",
      "description": "How many workers pull review jobs from the queue at once.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "QUEUE_LEASE_TTL",
      "service": "arcticworks-codepeer",
      "description": "How long a worker holds a review job before it returns to the queue.",
      "secret": false,
      "strategy": "default",
      "default": "15m"
    },
    {
      "key": "QUEUE_MAX_ATTEMPTS",
      "service": "arcticworks-codepeer",
      "description": "How many times a failed review job is retried before it is dropped.",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "QUEUE_POLL_INTERVAL",
      "service": "arcticworks-codepeer",
      "description": "How often a worker polls the queue for new jobs, as a Go duration.",
      "secret": false,
      "strategy": "default",
      "default": "2s"
    },
    {
      "key": "LLM_REASONING_EFFORT",
      "service": "arcticworks-codepeer",
      "description": "Thinking effort for the review model: low, high, or max.",
      "secret": false,
      "strategy": "default",
      "default": "high"
    },
    {
      "key": "GITHUB_WEBHOOK_SECRET",
      "service": "arcticworks-codepeer",
      "description": "Webhook secret. Generated for you: copy this value into your GitHub App's webhook settings after deploying.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "GITHUB_APP_PRIVATE_KEY",
      "service": "arcticworks-codepeer",
      "description": "Your GitHub App's private key. Paste the PEM contents, or the PEM base64-encoded to keep it on one line.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "arcticworks-codepeer"
      }
    },
    "cli": "railway deploy --template arcticworks-codepeer",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "4f6b0423-cb4b-4670-af5b-9a4902e8efbd",
            "serializedConfig": {
              "services": {
                "a4fced7e-4049-4606-bba6-879ab83b8ea9": {
                  "icon": "https://devicons.railway.app/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 Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "a4fced7e-4049-4606-bba6-879ab83b8ea9": {
                      "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."
                  }
                },
                "f6f6f004-b62d-498b-ac28-a96fcd59369c": {
                  "name": "arcticworks-codepeer",
                  "deploy": {
                    "healthcheckPath": "/healthz"
                  },
                  "source": {
                    "repo": "ArcticWorks-Software-Company/arcticworks-codepeer"
                  },
                  "variables": {
                    "PORT": {
                      "description": "HTTP port the bot listens on. Leave this at 8080.",
                      "defaultValue": "8080"
                    },
                    "BOT_LOGIN": {
                      "isOptional": true,
                      "description": "The bot's GitHub login, used to ignore its own events. Optional: resolved automatically when left empty.",
                      "defaultValue": ""
                    },
                    "LLM_MODEL": {
                      "description": "Review model served by LLM_BASE_URL, for example deepseek-v4-flash.",
                      "defaultValue": "deepseek-v4-flash"
                    },
                    "LOG_LEVEL": {
                      "description": "Log verbosity: debug, info, warn, or error.",
                      "defaultValue": "info"
                    },
                    "LLM_API_KEY": {
                      "description": "DeepSeek API key. Every pull request review is run through this key.",
                      "defaultValue": "{{LLM_API_KEY}}"
                    },
                    "LLM_TIMEOUT": {
                      "description": "Timeout for a single model call, as a Go duration such as 300s.",
                      "defaultValue": "300s"
                    },
                    "DATABASE_URL": {
                      "description": "Postgres connection string, referenced from the Postgres service. Leave this as it is.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "LLM_BASE_URL": {
                      "description": "Base URL of the OpenAI-compatible API serving the review model. Defaults to DeepSeek.",
                      "defaultValue": "https://api.deepseek.com"
                    },
                    "GITHUB_APP_ID": {
                      "description": "App ID from your GitHub App's settings page.",
                      "defaultValue": "{{GITHUB_APP_ID}}"
                    },
                    "QUEUE_WORKERS": {
                      "description": "How many workers pull review jobs from the queue at once.",
                      "defaultValue": "2"
                    },
                    "QUEUE_LEASE_TTL": {
                      "description": "How long a worker holds a review job before it returns to the queue.",
                      "defaultValue": "15m"
                    },
                    "QUEUE_MAX_ATTEMPTS": {
                      "description": "How many times a failed review job is retried before it is dropped.",
                      "defaultValue": "5"
                    },
                    "QUEUE_POLL_INTERVAL": {
                      "description": "How often a worker polls the queue for new jobs, as a Go duration.",
                      "defaultValue": "2s"
                    },
                    "GITHUB_APP_CLIENT_ID": {
                      "isOptional": true,
                      "description": "Client ID from your GitHub App. Optional: used as the JWT issuer when set.",
                      "defaultValue": ""
                    },
                    "LLM_REASONING_EFFORT": {
                      "description": "Thinking effort for the review model: low, high, or max.",
                      "defaultValue": "high"
                    },
                    "GITHUB_WEBHOOK_SECRET": {
                      "description": "Webhook secret. Generated for you: copy this value into your GitHub App's webhook settings after deploying.",
                      "defaultValue": "{{GITHUB_WEBHOOK_SECRET}}"
                    },
                    "GITHUB_APP_PRIVATE_KEY": {
                      "description": "Your GitHub App's private key. Paste the PEM contents, or the PEM base64-encoded to keep it on one line.",
                      "defaultValue": "{{GITHUB_APP_PRIVATE_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "arcticworks-codepeer",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T22:14:43.398Z",
  "generator_version": "0.1.0"
}
