Skip to content

Commit 4dd3be6

Browse files
authored
Merge pull request #273 from christianhueserhzdr/272-make-gitlab-db-port-configurable-in-role-gitlab
Make GitLab DB port configurable in GitLab config template
2 parents 9c07b8c + 34a5bb0 commit 4dd3be6

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

roles/gitlab/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ gitlab_feature_flags:
208208
- name: "chatops"
209209
enabled: true
210210
- name: "webauthn"
211-
enabled: false
211+
enabled: false
212212
```
213213

214214
#### Mattermost only use case
@@ -359,6 +359,14 @@ Set IP Address of PostgreSQL Database instance:
359359
gitlab_postgresql_db_host: '127.0.0.1'
360360
```
361361

362+
#### Port of External PostgreSQL Database Instance
363+
364+
Set port of PostgreSQL database instance, if port other than `5432` is used:
365+
366+
```yaml
367+
gitlab_postgresql_db_port: 5432
368+
```
369+
362370
#### Password for External PostgreSQL Database Instance
363371

364372
Set password of PostgreSQL Database instance:

roles/gitlab/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ gitlab_gitaly_instance_port: "8075"
6666
gitlab_use_internal_postgresql: "true"
6767
# External PostgreSQL database host IP / domain
6868
gitlab_postgresql_db_host: "127.0.0.1"
69+
# External PostgreSQL database port
70+
gitlab_postgresql_db_port: 5432
6971
# External PostgreSQL database password
7072
gitlab_postgresql_db_password: "changeme"
7173

roles/gitlab/templates/gitlab.rb.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ postgresql['enable'] = false
5454
gitlab_rails['db_adapter'] = 'postgresql'
5555
gitlab_rails['db_encoding'] = 'unicode'
5656
gitlab_rails['db_host'] = "{{ gitlab_postgresql_db_host }}"
57+
gitlab_rails['db_port'] = {{ gitlab_postgresql_db_port }}
5758
gitlab_rails['db_password'] = "{{ gitlab_postgresql_db_password }}"
5859
{% endif %}
5960

0 commit comments

Comments
 (0)