diff --git a/templates/GitLab-CE/0/README.md b/templates/GitLab-CE/0/README.md deleted file mode 100644 index 4cc1b1b..0000000 --- a/templates/GitLab-CE/0/README.md +++ /dev/null @@ -1 +0,0 @@ -# Gitlab CE \ No newline at end of file diff --git a/templates/GitLab-CE/0/docker-compose.yml b/templates/GitLab-CE/0/docker-compose.yml deleted file mode 100644 index 18fcfbd..0000000 --- a/templates/GitLab-CE/0/docker-compose.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/templates/GitLab/0/README.md b/templates/GitLab/0/README.md new file mode 100644 index 0000000..ff50006 --- /dev/null +++ b/templates/GitLab/0/README.md @@ -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] \ No newline at end of file diff --git a/templates/GitLab/0/docker-compose.yml b/templates/GitLab/0/docker-compose.yml new file mode 100644 index 0000000..fd6abf1 --- /dev/null +++ b/templates/GitLab/0/docker-compose.yml @@ -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 \ No newline at end of file diff --git a/templates/GitLab-CE/0/rancher-compose.yml b/templates/GitLab/0/rancher-compose.yml similarity index 66% rename from templates/GitLab-CE/0/rancher-compose.yml rename to templates/GitLab/0/rancher-compose.yml index ec18038..7606f17 100644 --- a/templates/GitLab-CE/0/rancher-compose.yml +++ b/templates/GitLab/0/rancher-compose.yml @@ -1,6 +1,6 @@ version: '2' catalog: - name: Gitlab-CE + name: GitLab version: latest # description: # minimum_rancher_version: @@ -11,7 +11,7 @@ catalog: - variable: "HOST_LABEL" label: "Host Label Key/Value Pair" 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" required: false type: string @@ -20,16 +20,7 @@ catalog: label: "Public Host Domain" description: | The host that Traefik will use to provide public access. - Leaving this empty will disable Traefik on this stack. 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 type: string @@ -37,6 +28,6 @@ catalog: label: "Data Directory" description: | The directory to store persistent data for the stack. - default: "Personal/Gitlab-CE" + default: "Personal/GitLab" required: true type: string \ No newline at end of file diff --git a/templates/GitLab-CE/catalogIcon-gitlab.svg b/templates/GitLab/catalogIcon-gitlab.svg similarity index 100% rename from templates/GitLab-CE/catalogIcon-gitlab.svg rename to templates/GitLab/catalogIcon-gitlab.svg diff --git a/templates/GitLab-CE/config.yml b/templates/GitLab/config.yml similarity index 82% rename from templates/GitLab-CE/config.yml rename to templates/GitLab/config.yml index 11c46a9..0e70d03 100644 --- a/templates/GitLab-CE/config.yml +++ b/templates/GitLab/config.yml @@ -1,4 +1,4 @@ -name: Gitlab (Community Edition) +name: GitLab (Community Edition) description: | Status: NOT READY version: latest