Files
computer-playbook/roles/web-app-gitlab/templates/config/database.yml.j2
kevinveenbirkenbachandClaude Opus 4.8 0bf1e8ef8c refactor(gitlab): replace Omnibus with the Cloud Native GitLab composition
Deploy GitLab from the official CNG CE images as six services: webservice (puma) and sidekiq scale to the topology default, workhorse is the sole HTTP entry, gitaly and a one-shot migrations job are pinned singletons, shell runs gitlab-sshd. The Omnibus container, its Dockerfile and the GITLAB_OMNIBUS_* config groups are removed. All rails/workhorse/shell/gitaly configs and shared secrets are pre-rendered by Ansible and mounted read-only; eleven credentials land in meta/schema.yml including an rsa_pem_2048 OIDC signing key (new value_generator algorithm). Postgres, redis and S3 object storage ride the existing lookups; OIDC, SMTP, the public SSH port and the root password are preserved. compose_volumes gains a per-volume nfs:false opt-out so the gitaly repositories volume stays node-local in swarm (upstream forbids git repositories on NFS); nfs_prep skips volumes without driver_opts accordingly. The Nextcloud gitlab integration execs the CNG rails runner. ruby_single_line dies with its only consumer; ruby_dq keeps test coverage. Ports (8181/8080/2222/8075/3808/9122) and service names resolve from single SPOT declarations in meta/services.yml via vars constants; the version pin sits on the webservice image pair so the updater can bump it. Live-validated in compose up to all six services healthy and migrations completed; fresh-install-only semantics for existing Omnibus data are documented.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 02:37:27 +02:00

22 lines
956 B
Django/Jinja

---
production:
main:
adapter: postgresql
encoding: unicode
database: {{ lookup('database', application_id, 'name') | to_json }}
username: {{ lookup('database', application_id, 'username') | to_json }}
password: {{ lookup('database', application_id, 'password') | to_json }}
host: {{ lookup('database', application_id, 'host') | to_json }}
port: {{ lookup('database', application_id, 'port') }}
pool: {{ POSTGRES_ALLOWED_AVG_CONNECTIONS }}
ci:
adapter: postgresql
encoding: unicode
database: {{ lookup('database', application_id, 'name') | to_json }}
username: {{ lookup('database', application_id, 'username') | to_json }}
password: {{ lookup('database', application_id, 'password') | to_json }}
host: {{ lookup('database', application_id, 'host') | to_json }}
port: {{ lookup('database', application_id, 'port') }}
pool: {{ POSTGRES_ALLOWED_AVG_CONNECTIONS }}
database_tasks: false