Merge branch 'develop/gitlab'

This commit is contained in:
WilliamMiceli
2019-02-08 21:24:09 -05:00
7 changed files with 63 additions and 50 deletions

View File

@@ -1 +0,0 @@
# Gitlab CE

View File

@@ -1,36 +0,0 @@
version: '2'
services:
gitlab-ce:
image: gitlab/gitlab-ce:latest
dns:
- 1.1.1.1
- 1.0.0.1
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://${TRAEFIK_HOST}:${WEB_PORT}'
hostname: ${TRAEFIK_HOST}
labels:
io.rancher.container.pull_image: always
{{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
{{- if .Values.TRAEFIK_HOST}}
traefik.enable: true
traefik.frontend.rule: Host:${TRAEFIK_HOST}
traefik.port: "80"
traefik.frontend.entryPoints: http,https
traefik.frontend.headers.forceSTSHeader: true
traefik.frontend.headers.SSLRedirect: true
traefik.frontend.headers.STSPreload: true
traefik.frontend.headers.STSSeconds: 15552000
{{- else}}
traefik.enable: false
{{- end}}
ports:
- "${WEB_PORT}:80"
# - "${SSH_PORT}:22"
restart: on-failure
volumes:
- /RancherCattleConfig/${DATA_DIR}/Config:/etc/gitlab
- /RancherCattleConfig/${DATA_DIR}/Logs:/var/log/gitlab
- /RancherCattleData/${DATA_DIR}/Data:/var/opt/gitlab

View File

@@ -0,0 +1,13 @@
# GitLab (Community Edition)
## Manually Adding More Environment Variables With Omnibus
[Main Omnibus Documentation](https://docs.gitlab.com/omnibus/settings/configuration.html)
[All Available Options Located Here](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template)
[NGINX Settings](https://docs.gitlab.com/omnibus/settings/nginx.html)
# GitLab Runner (future project)
[https://docs.gitlab.com/runner/install/docker.html]
[https://hub.docker.com/r/gitlab/gitlab-runner/tags]
[https://medium.freecodecamp.org/how-to-setup-ci-on-gitlab-using-docker-66e1e04dcdc2]

View File

@@ -0,0 +1,46 @@
version: '2'
services:
gitlab:
image: gitlab/gitlab-ce:latest
dns:
- 1.1.1.1
- 1.0.0.1
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://${TRAEFIK_HOST}'
gitlab_rails['gitlab_shell_ssh_port'] = 1022
nginx['real_ip_trusted_addresses'] = [ '10.42.0.0/16' ] # 10.42.0.0/16 is the default Rancher managed subnet
nginx['listen_port'] = 80 # Using HTTP between the Traefik container and GitLab
nginx['listen_https'] = false # Traefik is handling HTTPS on outside
hostname: ${TRAEFIK_HOST}
labels:
io.rancher.container.pull_image: always
{{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
traefik.enable: true
### Start Web Segment
traefik.web.frontend.entryPoints: http,https
traefik.web.frontend.headers.forceSTSHeader: true
traefik.web.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information)
traefik.web.frontend.headers.SSLRedirect: true
traefik.web.frontend.headers.STSPreload: true
traefik.web.frontend.headers.STSSeconds: 15552000
traefik.web.frontend.passHostHeader: true
traefik.web.frontend.rule: Host:${TRAEFIK_HOST}
traefik.web.port: "80"
### End Web Segment
### Start SSH Segment
# traefik.ssh.frontend.entryPoints: ssh
# traefik.ssh.frontend.rule: Host:${TRAEFIK_HOST}
# traefik.ssh.frontend.passHostHeader: true
# traefik.ssh.port: "22"
### End SSH Segment
restart: on-failure
volumes:
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
- /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system
- /RancherCattle/${DATA_DIR}/Config:/etc/gitlab
- /RancherCattle/${DATA_DIR}/Logs:/var/log/gitlab
- /RancherCattle/${DATA_DIR}/Data:/var/opt/gitlab

View File

@@ -1,6 +1,6 @@
version: '2' version: '2'
catalog: catalog:
name: Gitlab-CE name: GitLab
version: latest version: latest
# description: # description:
# minimum_rancher_version: # minimum_rancher_version:
@@ -11,7 +11,7 @@ catalog:
- variable: "HOST_LABEL" - variable: "HOST_LABEL"
label: "Host Label Key/Value Pair" label: "Host Label Key/Value Pair"
description: | description: |
The Label Key/Value pair on the host which containers should be deployed The Label Key/Value pair of the host which containers should be deployed
default: "host.id=Host2" default: "host.id=Host2"
required: false required: false
type: string type: string
@@ -20,16 +20,7 @@ catalog:
label: "Public Host Domain" label: "Public Host Domain"
description: | description: |
The host that Traefik will use to provide public access. The host that Traefik will use to provide public access.
Leaving this empty will disable Traefik on this stack.
default: "subdomain.domain.tld" default: "subdomain.domain.tld"
required: false
type: string
- variable: "WEB_PORT"
label: "Web Port"
description: |
The port to access the web interface on.
default: "20300"
required: true required: true
type: string type: string
@@ -37,6 +28,6 @@ catalog:
label: "Data Directory" label: "Data Directory"
description: | description: |
The directory to store persistent data for the stack. The directory to store persistent data for the stack.
default: "Personal/Gitlab-CE" default: "Personal/GitLab"
required: true required: true
type: string type: string

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,4 +1,4 @@
name: Gitlab (Community Edition) name: GitLab (Community Edition)
description: | description: |
Status: NOT READY Status: NOT READY
version: latest version: latest