[PR #1000] [MERGED] fix(gitlab-ce): serve on the generated domain (external_url/nginx config) #16308

Closed
opened 2026-07-14 23:18:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Dokploy/templates/pull/1000
Author: @Siumauricio
Created: 7/14/2026
Status: Merged
Merged: 7/14/2026
Merged by: @Siumauricio

Base: canaryHead: fix/gitlab-ce


📝 Commits (1)

  • 8f84a52 fix(gitlab-ce): serve on the generated domain (remove removed unicorn config, pin omnibus)

📊 Changes

3 files changed (+9 additions, -54 deletions)

View changed files

📝 blueprints/gitlab-ce/docker-compose.yml (+6 -47)
📝 blueprints/gitlab-ce/meta.json (+1 -1)
📝 blueprints/gitlab-ce/template.toml (+2 -6)

📄 Description

Problem

The GitLab CE template deployed "successfully" but the generated domain only returned 502 Bad Gateway (#380).

Root cause: GITLAB_OMNIBUS_CONFIG contained unicorn['worker_processes'] / unicorn['worker_timeout']. Unicorn was removed in GitLab 14.0 (2021), so on any current gitlab/gitlab-ce image the first gitlab-ctl reconfigure aborts with Removed configurations found in gitlab.rb — GitLab's internal nginx/puma never start, and Traefik has nothing to proxy to.

Secondary issues in the old template:

  • ports: ["80", "2224"] published random host ports for nothing — 2224 pointed at a port nothing listens on (sshd inside the container listens on 22), and HTTP routing goes through Traefik anyway.
  • No initial root password was configured, so even a booted instance required docker exec to read /etc/gitlab/initial_root_password (which expires after 24h).
  • image: latest is what let the template silently rot as GitLab removed config keys.

Fix

Rewrote the template as the official all-in-one Omnibus setup:

  • Pin gitlab/gitlab-ce:19.1.2-ce.0 (current stable) instead of latest
  • external_url 'http://${GITLAB_HOST}' + nginx['listen_port'] = 80 + nginx['listen_https'] = false — correct config behind Dokploy/Traefik, which terminates TLS
  • gitlab_rails['initial_root_password'] wired to a generated ${password:32} template variable, so users can log in as root right away from the env tab
  • puma['worker_processes'] = 0 (single mode) and prometheus_monitoring['enable'] = false to keep memory reasonable for VPS deployments; shm_size: 256m per GitLab's Docker docs
  • Dropped the external postgres/redis containers — Omnibus bundles and manages its own, which removes a whole class of version/migration failure modes (the template was broken before those ever got exercised)
  • Removed the broken ports entries

Verification (live Dokploy instance)

Deployed on hostinger.dokploy.com via the template import API:

  • Deploy: done; container running, no OOM
  • Domain polling after deploy (first gitlab-ctl reconfigure takes ~5 min):
    1: HTTP 404 → 2-4: HTTP 502 → 5: HTTP 502 «Waiting for GitLab to boot» → 6: HTTP 200 «Sign in · GitLab»
    
  • GET / → 302 to /users/sign_in, GET /users/sign_in → 200
  • Logged in as root with the generated GITLAB_ROOT_PASSWORD: POST /users/sign_in → 302, dashboard renders 200 «Projects · GitLab»

Note: first boot takes ~5-6 minutes after the deploy finishes while Omnibus runs its initial reconfigure — the domain shows 502/"Waiting for GitLab to boot" until then.

node build-scripts/generate-meta.js --check passes (476 templates validated).

Closes #380

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Dokploy/templates/pull/1000 **Author:** [@Siumauricio](https://github.com/Siumauricio) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@Siumauricio](https://github.com/Siumauricio) **Base:** `canary` ← **Head:** `fix/gitlab-ce` --- ### 📝 Commits (1) - [`8f84a52`](https://github.com/Dokploy/templates/commit/8f84a528553fdf9da6d7cb5c37ab5d3f3df65283) fix(gitlab-ce): serve on the generated domain (remove removed unicorn config, pin omnibus) ### 📊 Changes **3 files changed** (+9 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `blueprints/gitlab-ce/docker-compose.yml` (+6 -47) 📝 `blueprints/gitlab-ce/meta.json` (+1 -1) 📝 `blueprints/gitlab-ce/template.toml` (+2 -6) </details> ### 📄 Description ## Problem The GitLab CE template deployed "successfully" but the generated domain only returned **502 Bad Gateway** (#380). **Root cause:** `GITLAB_OMNIBUS_CONFIG` contained `unicorn['worker_processes']` / `unicorn['worker_timeout']`. Unicorn was removed in GitLab 14.0 (2021), so on any current `gitlab/gitlab-ce` image the first `gitlab-ctl reconfigure` aborts with `Removed configurations found in gitlab.rb` — GitLab's internal nginx/puma never start, and Traefik has nothing to proxy to. Secondary issues in the old template: - `ports: ["80", "2224"]` published random host ports for nothing — `2224` pointed at a port nothing listens on (sshd inside the container listens on 22), and HTTP routing goes through Traefik anyway. - No initial root password was configured, so even a booted instance required `docker exec` to read `/etc/gitlab/initial_root_password` (which expires after 24h). - `image: latest` is what let the template silently rot as GitLab removed config keys. ## Fix Rewrote the template as the official all-in-one Omnibus setup: - Pin `gitlab/gitlab-ce:19.1.2-ce.0` (current stable) instead of `latest` - `external_url 'http://${GITLAB_HOST}'` + `nginx['listen_port'] = 80` + `nginx['listen_https'] = false` — correct config behind Dokploy/Traefik, which terminates TLS - `gitlab_rails['initial_root_password']` wired to a generated `${password:32}` template variable, so users can log in as `root` right away from the env tab - `puma['worker_processes'] = 0` (single mode) and `prometheus_monitoring['enable'] = false` to keep memory reasonable for VPS deployments; `shm_size: 256m` per GitLab's Docker docs - Dropped the external `postgres`/`redis` containers — Omnibus bundles and manages its own, which removes a whole class of version/migration failure modes (the template was broken before those ever got exercised) - Removed the broken `ports` entries ## Verification (live Dokploy instance) Deployed on hostinger.dokploy.com via the template import API: - Deploy: `done`; container `running`, no OOM - Domain polling after deploy (first `gitlab-ctl reconfigure` takes ~5 min): ``` 1: HTTP 404 → 2-4: HTTP 502 → 5: HTTP 502 «Waiting for GitLab to boot» → 6: HTTP 200 «Sign in · GitLab» ``` - `GET /` → 302 to `/users/sign_in`, `GET /users/sign_in` → 200 - Logged in as `root` with the generated `GITLAB_ROOT_PASSWORD`: `POST /users/sign_in` → 302, dashboard renders `200 «Projects · GitLab»` Note: first boot takes ~5-6 minutes after the deploy finishes while Omnibus runs its initial reconfigure — the domain shows 502/"Waiting for GitLab to boot" until then. `node build-scripts/generate-meta.js --check` passes (476 templates validated). Closes #380 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-14 23:18:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#16308