add basic auth to torrent
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4e9155e0db
commit
9a0aa359a5
@ -6,6 +6,9 @@ job "torrent" {
|
||||
meta {
|
||||
forcedeploy = "0"
|
||||
}
|
||||
vault {
|
||||
policies= ["torrent"]
|
||||
}
|
||||
group "bittorent" {
|
||||
network {
|
||||
mode = "host"
|
||||
@ -40,10 +43,17 @@ job "torrent" {
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure",
|
||||
|
||||
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.middlewares=torrentauth",
|
||||
"traefik.http.middlewares.torrentauth.basicauth.users=admin:${ADMIN_HASHED_PWD}"
|
||||
]
|
||||
}
|
||||
template {
|
||||
data = <<-EOF
|
||||
ADMIN_HASHED_PWD={{ with secret "secrets/nomad/torrent" }}{{.Data.data.hashed_pwd}}{{ end }}
|
||||
EOF
|
||||
destination = "secrets/env"
|
||||
env = true
|
||||
}
|
||||
user = "root"
|
||||
config {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user