Skip to content
Snippets Groups Projects
Commit 5d473948 authored by Christian Dresen's avatar Christian Dresen
Browse files

Enable gitlab in nginx

parent fc895d74
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
## Url on which GitLab will be reachable.
## For more details on configuring external_url see:
## https://gitlab.com/gitlab-org/omnibus-gitlab/blob/629def0a7a26e7c2326566f0758d4a27857b52a3/README.md#configuring-the-external-url-for-gitlab
# external_url 'GENERATED_EXTERNAL_URL' # default: http://hostname
external_url 'http://gitlab.wz.dyhost.de' # default: http://hostname
## Note: configuration settings below are optional.
......@@ -209,7 +209,7 @@
# DEPRECATED: gitlab_rails['satellites_timeout'] = 30
## GitLab Shell settings for GitLab
# gitlab_rails['gitlab_shell_ssh_port'] = 22
gitlab_rails['gitlab_shell_ssh_port'] = 2222
# gitlab_rails['git_max_size'] = 20971520
# gitlab_rails['git_timeout'] = 10
......@@ -561,8 +561,8 @@
# GitLab Mattermost #
#####################
# mattermost_external_url 'http://mattermost.example.com'
#
mattermost_external_url 'http://mattermost.wz.dyhost.de/gitlab/mattermost'
mattermost['enable'] = true
# mattermost['username'] = 'mattermost'
# mattermost['group'] = 'mattermost'
......@@ -694,7 +694,7 @@ mattermost_nginx['enable'] = true
# mattermost_nginx['ssl_session_cache'] = "builtin:1000 shared:SSL:10m" # recommended in http://nginx.org/en/docs/http/ngx_http_ssl_module.html
# mattermost_nginx['ssl_session_timeout'] = "5m" # default according to http://nginx.org/en/docs/http/ngx_http_ssl_module.html
# mattermost_nginx['ssl_dhparam'] = nil # Path to ci_dhparams.pem, eg. /etc/gitlab/ssl/ci_dhparams.pem
# mattermost_nginx['listen_addresses'] = ['*']
mattermost_nginx['listen_addresses'] = ['*']
mattermost_nginx['listen_port'] = 42002 # override only if you use a reverse proxy: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md#setting-the-nginx-listen-port
# mattermost_nginx['listen_https'] = nil # override only if your reverse proxy internally communicates over HTTP: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md#supporting-proxied-ssl
# mattermost_nginx['custom_gitlab_mattermost_server_config'] = "location ^~ /foo-namespace/bar-project/raw/ {\n deny all;\n}\n"
......
server {
listen 80;
listen [::]:80;
server_name gitlab.wz.dyhost.de mattermost.wz.dyhost.de;
root /var/www/html;
index index.html;
location / {
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_pass http://127.0.0.1:42001/;
proxy_redirect off;
}
}
......@@ -29,6 +29,14 @@
copy: src=default dest=/etc/nginx/sites-available/default
notify: restart nginx
- name: Konfig-Datei gitlab kopieren
copy: src=gitlab dest=/etc/nginx/sites-available/gitlab
notify: restart nginx
- name: Activate gitlab config
file: src=/etc/nginx/sites-enable/gitlab dest=/etc/nginx/sites-available/gitlab state=link
- name: Cronjob für Zertifikatserneuerung
cron: name="simp_le" weekday="2" hour="20" minute="0" job="cd /etc/ssl && PATH=/usr/src/simp_le/venv/bin:/usr/sbin:/usr/bin:/sbin:/bin simp_le --email info@warpzone.ms -f account_key.json -f key.pem -f fullchain.pem -d wz.dyhost.de:/var/www/html && systemctl reload nginx"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment