resource "docker_container" "server" { image = docker_image.server.image_id name = "buildfarm-server" must_run = true networks_advanced { name = docker_network.buildfarm.name } networks_advanced { name = data.docker_network.traefik.name } # ports { # internal = 8090 # external = 8090 # protocol = "tcp" # ip = "fdf3:aad9:a885:77dd::2" # } # { label = "traefik.tcp.routers.buildfarm-server.rule", value = "Host(`buildfarm-server.vpn.trygvis.io`)" }, dynamic "labels" { for_each = [ { label = "traefik.enable", value = "true" }, { label = "traefik.docker.network", value = data.docker_network.traefik.name }, { label = "traefik.tcp.routers.buildfarm-server.rule", value = "HostSNI(`*`)" }, { label = "traefik.tcp.routers.buildfarm-server.entrypoints", value = "buildfarm" }, { label = "traefik.tcp.routers.buildfarm-server.service", value = "buildfarm-server" }, { label = "traefik.tcp.services.buildfarm-server.loadbalancer.server.port", value = "8980" }, ] content { label = labels.value["label"] value = labels.value["value"] } } env = [ "REDIS_URI=redis://${docker_container.redis.name}:6379", ] }