Experimental: Update traefik Host() rules for v3
This commit is contained in:
parent
34db2e1923
commit
285aaff77d
10 changed files with 60 additions and 13 deletions
|
|
@ -2,7 +2,8 @@ DATA_PATH=${DATA_PATH}
|
|||
RUNTIME_DIR=${RUNTIME_DIR}
|
||||
|
||||
SLUG=${SLUG}
|
||||
VIRTUAL_HOST=${VIRTUAL_HOST}
|
||||
HOSTNAME=${HOSTNAME}
|
||||
HOST_RULE=${HOST_RULE}
|
||||
DOCKER_NETWORK_NAME=${DOCKER_NETWORK_NAME}
|
||||
|
||||
HTTPS_ENABLED=${HTTPS_ENABLED}
|
||||
|
|
@ -4,14 +4,14 @@ services:
|
|||
barrel:
|
||||
build: .
|
||||
restart: always
|
||||
hostname: ${VIRTUAL_HOST}.wisski
|
||||
hostname: ${HOSTNAME}
|
||||
|
||||
# label it with the current slug
|
||||
labels:
|
||||
- "traefik.enable=True"
|
||||
- "eu.wiss-ki.barrel.distillery=${DOCKER_NETWORK_NAME}"
|
||||
|
||||
- "traefik.http.routers.wisski_${SLUG}.rule=Host(`${VIRTUAL_HOST}`)"
|
||||
- "traefik.http.routers.wisski_${SLUG}.rule=${HOST_RULE}"
|
||||
- "traefik.http.routers.wisski_${SLUG}.tls=${HTTPS_ENABLED}"
|
||||
- "traefik.http.routers.wisski_${SLUG}.tls.certresolver=distillery"
|
||||
- "traefik.http.services.wisski_${SLUG}.loadbalancer.server.port=8080"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ func (barrel *Barrel) Stack() component.StackWithResources {
|
|||
"DOCKER_NETWORK_NAME": barrel.Malt.Config.Docker.Network(),
|
||||
|
||||
"SLUG": barrel.Slug,
|
||||
"VIRTUAL_HOST": barrel.Domain(),
|
||||
"HOST_RULE": barrel.HostRule(),
|
||||
"HOSTNAME": barrel.Hostname(),
|
||||
"HTTPS_ENABLED": barrel.Malt.Config.HTTP.HTTPSEnabledEnv(),
|
||||
|
||||
"DATA_PATH": filepath.Join(barrel.FilesystemBase, "data"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue