Add GitLab EE Ansible role (temp location - move to infrastructure/ansible)
Some checks failed
CI / test (push) Has been cancelled
CI / docker-push (push) Has been cancelled

This commit is contained in:
Lennie S.
2026-04-12 15:47:37 +00:00
parent d50c51d09c
commit 03b61e04d6
7 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
---
services:
gitlab:
image: {{ gitlab_gitlab_ee_image }}
hostname: {{ gitlab_hostname }}
environment:
GITLAB_EXTERNAL_URL: "{{ gitlab_external_url }}"
GITLAB_SSH_PORT: {{ gitlab_ssh_port }}
ports:
- "{{ gitlab_ssh_port }}:22"
volumes:
- {{ gitlab_config_path }}:/etc/gitlab
- {{ gitlab_logs_path }}:/var/log/gitlab
- {{ gitlab_data_path }}:/var/opt/gitlab
- {{ gitlab_state_path }}:/var/gitlab/state
restart: unless-stopped
shm_size: '256m'
proxy:
image: {{ gitlab_nginx_image }}
ports:
- "{{ gitlab_proxy_port }}:80"
- "{{ gitlab_https_port }}:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
gitlab:
condition: service_started
restart: unless-stopped

View File

@@ -0,0 +1,27 @@
upstream gitlab {
server gitlab:{{ gitlab_http_port }};
}
server {
listen 80;
server_name {{ gitlab_hostname }};
location / {
proxy_pass http://gitlab;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_request_buffering off;
}
# GitLab WebSocket support for git clone via HTTP
location /-/gitlab-lfs/objects {
proxy_pass http://gitlab;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}