-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
gitlab.yml
49 lines (45 loc) · 1.48 KB
/
gitlab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# DOMAIN=example.com docker stack deploy -c gitlab.yml gitlab
services:
gitlab:
image: gitlab/gitlab-ce:${VERSION:-16.11.0-ce.0}
environment:
GITLAB_ROOT_EMAIL: ${ADMIN_EMAIL:[email protected]}
GITLAB_ROOT_PASSWORD: ${ADMIN_PASSWORD:-myp@ssw0rd}
# GITLAB_OMNIBUS_CONFIG: |
# external_url "http://gitlab.localhost"
# mattermost_external_url "http://mattermost.localhost"
# mattermost['enable'] = true
volumes:
- ${VOLUME_PATH}data:/var/opt/gitlab
- ${VOLUME_PATH}logs:/var/log/gitlab
- ${VOLUME_PATH}config:/etc/gitlab
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.gitlab-${NUMBER:-1}.rule=Host(`${DOMAIN:-gitlab.localhost}`)
# - traefik.http.routers.gitlab-${NUMBER:-1}.rule=Host(`${DOMAIN:-gitlab.localhost}`, `mattermost.localhost`)
- traefik.http.routers.gitlab-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.gitlab-${NUMBER:-1}.service=gitlab-${NUMBER:-1}
- traefik.http.routers.gitlab-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.gitlab-${NUMBER:-1}.loadbalancer.server.port=80
networks:
- traefik
- internal
gitlab-runner:
image: gitlab/gitlab-runner:alpine
deploy:
mode: replicated
replicas: 1
networks:
- internal
volumes:
data:
logs:
config:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net