Skip to content

Commit 9b4b427

Browse files
authored
Microsoft SQL Server with Let's Encrypt Using Docker Compose
1 parent b97ed54 commit 9b4b427

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

mssql-server-traefik-letsencrypt-docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ services:
6060
- "--entrypoints.web.address=:80"
6161
# Define the secure (HTTPS) entry point on port 443
6262
- "--entrypoints.websecure.address=:443"
63+
# HTTP -> HTTPS redirect at entrypoint level
64+
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
65+
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
6366
# Define the SQL entry point on port 1433
6467
- "--entryPoints.sql.address=:1433"
6568
# Enable the Docker provider to detect containers and their labels
@@ -114,9 +117,4 @@ services:
114117
- "traefik.http.services.dashboard.loadbalancer.server.port=8080"
115118
# Pass the original Host header to the backend
116119
- "traefik.http.services.dashboard.loadbalancer.passhostheader=true"
117-
# HTTP -> HTTPS redirect for all hosts
118-
- "traefik.http.routers.http-catchall.rule=HostRegexp(`{host:.+}`)"
119-
- "traefik.http.routers.http-catchall.entrypoints=web"
120-
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
121-
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
122120
restart: unless-stopped

0 commit comments

Comments
 (0)