Skip to content

Commit a549e07

Browse files
authored
GitLab with Let's Encrypt Using Docker Compose
1 parent 89fc333 commit a549e07

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

gitlab-traefik-letsencrypt-docker-compose.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ services:
140140
- "--entrypoints.web.address=:80"
141141
# Define the secure (HTTPS) entry point on port 443
142142
- "--entrypoints.websecure.address=:443"
143+
# HTTP -> HTTPS redirect at entrypoint level
144+
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
145+
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
143146
# Define the SSH entry point using an environment variable for the port
144147
- "--entryPoints.ssh.address=:${GITLAB_SHELL_SSH_PORT}"
145148
# Enable the Docker provider to detect containers and their labels
@@ -194,9 +197,4 @@ services:
194197
- "traefik.http.services.dashboard.loadbalancer.server.port=8080"
195198
# Pass the original Host header to the backend
196199
- "traefik.http.services.dashboard.loadbalancer.passhostheader=true"
197-
# HTTP -> HTTPS redirect for all hosts
198-
- "traefik.http.routers.http-catchall.rule=HostRegexp(`{host:.+}`)"
199-
- "traefik.http.routers.http-catchall.entrypoints=web"
200-
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
201-
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
202200
restart: unless-stopped

0 commit comments

Comments
 (0)