{
  "manifest_version": "1.0.0",
  "template": {
    "id": "adee3a50-4aab-42b0-b71c-201e05046ccf",
    "slug": "gitlab-ce-fixed",
    "name": "GitLab CE: Git hosting and CI/CD, GitHub alternative",
    "description": "Private Git repos, merge requests, CI/CD pipelines, issue boards and wiki",
    "url": "https://railway.com/deploy/gitlab-ce-fixed",
    "upstream": {
      "image": "gitlab/gitlab-ce:19.4.2-ce.0"
    }
  },
  "services": [
    {
      "name": "GitLab",
      "source": {
        "image": "gitlab/gitlab-ce:19.4.2-ce.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/opt/gitlab",
      "tcp_ports": [
        22
      ],
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "GitLab",
      "description": "[Do not change] Port GitLab's web server listens on.",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "GITLAB_HOST",
      "service": "GitLab",
      "description": "Domain GitLab uses in its links and HTTPS clone URLs.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "GITLAB_SSH_HOST",
      "service": "GitLab",
      "description": "[Do not change] Host in SSH clone URLs.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GITLAB_SSH_PORT",
      "service": "GitLab",
      "description": "[Do not change] Port in SSH clone URLs.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GITLAB_PUMA_WORKERS",
      "service": "GitLab",
      "description": "Web worker processes; 0 runs a single process.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "GITLAB_ROOT_PASSWORD",
      "service": "GitLab",
      "description": "Password for the root user, applied once when GitLab first starts. Change it inside GitLab afterwards.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "GITLAB_OMNIBUS_CONFIG",
      "service": "GitLab",
      "description": "GitLab settings (gitlab.rb lines, separated by semicolons). Add your own at the end.",
      "secret": false,
      "strategy": "default",
      "default": "external_url 'https://' + ENV['GITLAB_HOST']; nginx['listen_port'] = 80; nginx['listen_https'] = false; nginx['proxy_set_headers'] = { 'X-Forwarded-Proto' => 'https', 'X-Forwarded-Ssl' => 'on' }; nginx['real_ip_trusted_addresses'] = ['100.64.0.0/10', 'fd00::/8']; nginx['real_ip_header'] = 'X-Forwarded-For'; nginx['real_ip_recursive'] = 'on'; gitlab_rails['trusted_proxies'] = ['100.64.0.0/10', 'fd00::/8']; letsencrypt['enable'] = false; gitlab_rails['initial_root_password'] = ENV['GITLAB_ROOT_PASSWORD']; gitlab_rails['gitlab_ssh_host'] = ENV['GITLAB_SSH_HOST'] unless ENV['GITLAB_SSH_HOST'].to_s.empty?; gitlab_rails['gitlab_shell_ssh_port'] = ENV['GITLAB_SSH_PORT'].to_i unless ENV['GITLAB_SSH_PORT'].to_s.empty?; puma['worker_processes'] = ENV.fetch('GITLAB_PUMA_WORKERS', '0').to_i; sidekiq['concurrency'] = ENV.fetch('GITLAB_SIDEKIQ_CONCURRENCY', '10').to_i; postgresql['dynamic_shared_memory_type'] = 'mmap'; postgresql['shared_buffers'] = '256MB'; prometheus_monitoring['enable'] = false; gitlab_kas['enable'] = false; gitlab_rails['env'] = { 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000' }; gitaly['env'] = { 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000', 'GITALY_COMMAND_SPAWN_MAX_PARALLEL' => '2' }"
    },
    {
      "key": "GITLAB_SIDEKIQ_CONCURRENCY",
      "service": "GitLab",
      "description": "Background job threads.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "GitLab",
      "description": "[Do not change] Seconds Railway waits for GitLab's first boot to pass the healthcheck.",
      "secret": false,
      "strategy": "default",
      "default": "1800"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "GitLab",
      "description": "[Do not change] Seconds GitLab gets to shut down cleanly on a redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "120"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "gitlab-ce-fixed"
      }
    },
    "cli": "railway deploy --template gitlab-ce-fixed",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "adee3a50-4aab-42b0-b71c-201e05046ccf",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "da1ece78-0f81-45aa-9caf-e0ecaac1e59f": {
                  "icon": "https://about.gitlab.com/images/ico/favicon-192x192.png",
                  "name": "GitLab",
                  "deploy": {
                    "startCommand": "/bin/bash -c 'set -e; mkdir -p /var/opt/gitlab/etc-gitlab; if [ ! -L /etc/gitlab ]; then cp -an /etc/gitlab/. /var/opt/gitlab/etc-gitlab/ 2>/dev/null || true; rm -rf /etc/gitlab; ln -s /var/opt/gitlab/etc-gitlab /etc/gitlab; fi; set +e; /assets/init-container & child=$!; trap \"gitlab-ctl stop sidekiq; gitlab-ctl stop puma; gitlab-ctl stop; rc=\\$?; kill -TERM $child 2>/dev/null; wait $child; exit \\$rc\" TERM; wait $child'",
                    "healthcheckPath": "/users/sign_in",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "gitlab/gitlab-ce:19.4.2-ce.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "[Do not change] Port GitLab's web server listens on.",
                      "defaultValue": "80"
                    },
                    "GITLAB_HOST": {
                      "isOptional": false,
                      "description": "Domain GitLab uses in its links and HTTPS clone URLs.",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "GITLAB_SSH_HOST": {
                      "isOptional": false,
                      "description": "[Do not change] Host in SSH clone URLs.",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_DOMAIN}}"
                    },
                    "GITLAB_SSH_PORT": {
                      "isOptional": false,
                      "description": "[Do not change] Port in SSH clone URLs.",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "GITLAB_PUMA_WORKERS": {
                      "isOptional": false,
                      "description": "Web worker processes; 0 runs a single process.",
                      "defaultValue": "0"
                    },
                    "GITLAB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the root user, applied once when GitLab first starts. Change it inside GitLab afterwards.",
                      "defaultValue": "{{GITLAB_ROOT_PASSWORD}}"
                    },
                    "GITLAB_OMNIBUS_CONFIG": {
                      "isOptional": false,
                      "description": "GitLab settings (gitlab.rb lines, separated by semicolons). Add your own at the end.",
                      "defaultValue": "external_url 'https://' + ENV['GITLAB_HOST']; nginx['listen_port'] = 80; nginx['listen_https'] = false; nginx['proxy_set_headers'] = { 'X-Forwarded-Proto' => 'https', 'X-Forwarded-Ssl' => 'on' }; nginx['real_ip_trusted_addresses'] = ['100.64.0.0/10', 'fd00::/8']; nginx['real_ip_header'] = 'X-Forwarded-For'; nginx['real_ip_recursive'] = 'on'; gitlab_rails['trusted_proxies'] = ['100.64.0.0/10', 'fd00::/8']; letsencrypt['enable'] = false; gitlab_rails['initial_root_password'] = ENV['GITLAB_ROOT_PASSWORD']; gitlab_rails['gitlab_ssh_host'] = ENV['GITLAB_SSH_HOST'] unless ENV['GITLAB_SSH_HOST'].to_s.empty?; gitlab_rails['gitlab_shell_ssh_port'] = ENV['GITLAB_SSH_PORT'].to_i unless ENV['GITLAB_SSH_PORT'].to_s.empty?; puma['worker_processes'] = ENV.fetch('GITLAB_PUMA_WORKERS', '0').to_i; sidekiq['concurrency'] = ENV.fetch('GITLAB_SIDEKIQ_CONCURRENCY', '10').to_i; postgresql['dynamic_shared_memory_type'] = 'mmap'; postgresql['shared_buffers'] = '256MB'; prometheus_monitoring['enable'] = false; gitlab_kas['enable'] = false; gitlab_rails['env'] = { 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000' }; gitaly['env'] = { 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000', 'GITALY_COMMAND_SPAWN_MAX_PARALLEL' => '2' }"
                    },
                    "GITLAB_SIDEKIQ_CONCURRENCY": {
                      "isOptional": false,
                      "description": "Background job threads.",
                      "defaultValue": "10"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "[Do not change] Seconds Railway waits for GitLab's first boot to pass the healthcheck.",
                      "defaultValue": "1800"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "[Do not change] Seconds GitLab gets to shut down cleanly on a redeploy.",
                      "defaultValue": "120"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "22": {}
                    },
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  },
                  "volumeMounts": {
                    "da1ece78-0f81-45aa-9caf-e0ecaac1e59f": {
                      "mountPath": "/var/opt/gitlab"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "GitLab",
      "method": "GET",
      "path": "/users/sign_in",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-14T22:14:45.225Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-14T22:27:27.399Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_2cda9f582aff44a5bc90",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 209,
    "typical_build_seconds": 0,
    "typical_start_seconds": 192,
    "slowest_service": "GitLab"
  }
}
