Hi, I am having trouble with Traefik, for some reason it cannot forward requests correctly to my Gitlab container. I thought this was a bug since I have everything set and it seems that Gitlab is the one Traefik has trouble and not my other containers like nextcloud so here is everything, from my Traefik logs to my toml:
debug = true
logLevel = "DEBUG"
defaultEntryPoints = ["https", "http"]
[entryPoints]
[entryPoints.traefiker]
address = ":8080"
[entryPoints.traefiker.auth]
[entryPoints.traefiker.auth.basic]
users = ["admin:<pwd>"]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
certFile = "/certs/apache-selfsigned.crt"
keyFile = "/certs/apache-selfsigned.key"
[api]
entrypoint="traefiker"
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "traefiker.<DOMAIN>.com"
watch = true
network = "web"
exposedbydefault = true
docker-compose.yml
version: '3'
services:
traefiker:
image: traefik:latest
restart: always
command: --docker
container_name: traefiker
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /docker/traefik.toml:/traefik.toml
- /docker/certs/:/certs/
labels:
- traefik.frontend.rule=Host:traefiker.<MYDOMAIN>.com
- traefik.port=8080
networks:
- web
container_name: traefiker
#--------------------GITLAB---------------------
gitlab:
image: gitlab/gitlab-ce:latest
container_name: gitlab
#restart: always
hostname: gitlab.<MYDOMAIN>.com
# I had problems with the health check. Sometimes it reported unhealthyness and therefore Traefik removed
# the container, so I turned it off. Maybe it works by now.
#healthcheck:
# disable: true
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.<MYDOMAIN>.com'
nginx['listen_port'] = 80
nginx['listen_https'] = false
nginx['http2_enabled'] = false
nginx['proxy_set_headers'] = {
"Host" => "$$http_host",
"X-Real-IP" => "$$remote_addr",
"X-Forwarded-For" => "$$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
gitlab_rails['gitlab_shell_ssh_port'] = 22
registry_external_url 'https://registry.gitlab.<MYDOMAIN>.com'
registry_nginx['listen_port'] = 5100
registry_nginx['listen_https'] = false
registry_nginx['proxy_set_headers'] = {
"Host" => "$$http_host",
"X-Real-IP" => "$$remote_addr",
"X-Forwarded-For" => "$$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
pages_external_url 'https://pages.gitlab.<MYDOMAIN>.com'
pages_nginx['listen_port'] = 5200
pages_nginx['listen_https'] = false
pages_nginx['proxy_set_headers'] = {
"Host" => "$$http_host",
"X-Real-IP" => "$$remote_addr",
"X-Forwarded-For" => "$$proxy_add_x_forwarded_for",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
gitlab_pages['inplace_chroot'] = true
gitlab_pages['external_http'] = ['gitlab:5201']
volumes:
- /docker/gitlab/config:/etc/gitlab
- /docker/gitlab/logs:/var/log/gitlab
- /docker/gitlab/data:/var/opt/gitlab
ports:
# Feel free to map this to a different port if that one is in use already
- "6558:80"
labels:
- traefik.enable=true
- traefik.docker.network=web
# Host settings for GitLab itself
- traefik.gitlab.frontend.rule=Host:gitlab.<MYDOMAIN>.com
- traefik.gitlab.port=80
# Host settings for the registry
- traefik.registry.frontend.rule=Host:registry.gitlab.<MYDOMAIN>.com
- traefik.registry.port=5100
# Host settings for GitLab pages. Since I don't have a wildcard certificate, I list every domain on it's own here
- traefik.pages.frontend.rule=Host:pages.gitlab.<MYDOMAIN>.com,username.pages.gitlab.<MYDOMAIN>.com
- traefik.pages.port=5201
networks:
- web
- internal
depends_on:
- traefiker
gitlab-runner:
container_name: gitlab-runner
image: gitlab/gitlab-runner:latest
restart: always
networks:
- web
- internal
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /docker/gitlab/gitlab-runner:/etc/gitlab-runner
links:
- gitlab
labels:
- "traefik.enable=false"
networks:
web:
external: true
internal:
external: false
logs: https://paste.ubuntu.com/p/fPmQZh597D/
I don't see where the issue arises and would like some guidance