36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
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 |