Skip to content

Commit

Permalink
Enable Traefik API and dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdewit committed Aug 12, 2024
1 parent 2cc2545 commit 2b6f35d
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion services/reverse-proxy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,41 @@ resource "docker_container" "reverse_proxy" {
command = [
"--providers.docker.endpoint=tcp://docker_proxy:2375",
"--providers.docker.exposedbydefault=false",
"--entrypoints.web.address=:80"
"--entrypoints.web.address=:80",
"--entrypoints.api.address=:8080",
"--api=true"
]

labels {
label = "traefik.enable"
value = "true"
}

labels {
label = "traefik.http.routers.api.entrypoints"
value = "api"
}

labels {
label = "traefik.http.routers.api.rule"
value = "PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
}

labels {
label = "traefik.http.routers.api.service"
value = "api@internal"
}

ports {
internal = 80
external = 80
}

ports {
internal = 8080
external = 8080
}

networks_advanced {
name = docker_network.socket.name
}
Expand Down

0 comments on commit 2b6f35d

Please sign in to comment.