add HTTPS redirection
This commit is contained in:
parent
b1bac2bd9e
commit
93adbdb05a
@ -6,8 +6,8 @@ job "homeassistant" {
|
|||||||
forcedeploy = "1"
|
forcedeploy = "1"
|
||||||
}
|
}
|
||||||
constraint {
|
constraint {
|
||||||
attribute = "${attr.cpu.arch}"
|
attribute = "${attr.unique.hostname}"
|
||||||
value = "amd64"
|
value = "oscar"
|
||||||
}
|
}
|
||||||
|
|
||||||
group "homeassistant"{
|
group "homeassistant"{
|
||||||
@ -38,6 +38,7 @@ job "homeassistant" {
|
|||||||
"traefik.enable=true",
|
"traefik.enable=true",
|
||||||
"traefik.http.middlewares.httpsRedirect.redirectscheme.scheme=https",
|
"traefik.http.middlewares.httpsRedirect.redirectscheme.scheme=https",
|
||||||
"traefik.http.routers.${NOMAD_TASK_NAME}_insecure.middlewares=httpsRedirect",
|
"traefik.http.routers.${NOMAD_TASK_NAME}_insecure.middlewares=httpsRedirect",
|
||||||
|
"traefik.http.routers.${NOMAD_TASK_NAME}_insecure.rule=Host(`${NOMAD_TASK_NAME}.ducamps.win`)"
|
||||||
"traefik.http.routers.${NOMAD_TASK_NAME}.rule=Host(`${NOMAD_TASK_NAME}.ducamps.win`)",
|
"traefik.http.routers.${NOMAD_TASK_NAME}.rule=Host(`${NOMAD_TASK_NAME}.ducamps.win`)",
|
||||||
"traefik.http.routers.${NOMAD_TASK_NAME}.tls.domains[0].sans=${NOMAD_TASK_NAME}.ducamps.win",
|
"traefik.http.routers.${NOMAD_TASK_NAME}.tls.domains[0].sans=${NOMAD_TASK_NAME}.ducamps.win",
|
||||||
"traefik.http.routers.${NOMAD_TASK_NAME}.tls.certresolver=myresolver",
|
"traefik.http.routers.${NOMAD_TASK_NAME}.tls.certresolver=myresolver",
|
||||||
|
@ -33,6 +33,10 @@ job "nextcloud" {
|
|||||||
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`file.ducamps.win`)",
|
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`file.ducamps.win`)",
|
||||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=file.ducamps.win",
|
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=file.ducamps.win",
|
||||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
|
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
|
||||||
|
"traefik.http.routers.${NOMAD_JOB_NAME}_insecure.entrypoints=web",
|
||||||
|
"traefik.http.routers.${NOMAD_JOB_NAME}_insecure.rule=Host(`file.ducamps.win`)",
|
||||||
|
"traefik.http.routers.${NOMAD_JOB_NAME}_insecure.middlewares=httpsRedirect",
|
||||||
|
"traefik.http.middlewares.httpsRedirect.redirectscheme.scheme=https",
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user