data "docker_registry_image" "jitsi_prosody" { name = "jitsi/prosody:stable" } locals { labels_prosody = { "shepherd.auto-update" = "true", "traefik.enable" = "true" "traefik.http.services.jitsi-prosody.loadbalancer.server.port" = "5280", "traefik.http.routers.jitsi-prosody.rule" = "Host(`talk.chaoswest.tv`)&&Path(`/room-census`)", "traefik.http.routers.jitsi-prosody.tls" = "true", "traefik.http.routers.jitsi-prosody.tls.certresolver" = "default", } } resource "docker_service" "jitsi_prosody" { name = "jitsi_prosody" dynamic "labels" { for_each = local.labels_prosody content { label = labels.key value = labels.value } } task_spec { networks_advanced { name = data.docker_network.traefik.id } networks_advanced { name = docker_network.jitsi.id } container_spec { image = "${data.docker_registry_image.jitsi_prosody.name}@${data.docker_registry_image.jitsi_prosody.sha256_digest}" env = { JIBRI_RECORDER_USER = "recorder", JIBRI_RECORDER_PASSWORD = nonsensitive(var.secrets.jibri_recorder_password), JIBRI_XMPP_USER = "jibri", JIBRI_XMPP_PASSWORD = nonsensitive(var.secrets.jibri_xmpp_password), JIGASI_XMPP_USER = "jigasi", JIGASI_XMPP_PASSWORD = nonsensitive(var.secrets.jigasi_xmpp_password), JVB_AUTH_USER = "jvb", JVB_AUTH_PASSWORD = nonsensitive(var.secrets.jvb_auth_password), JICOFO_AUTH_USER = "focus", JICOFO_AUTH_PASSWORD = nonsensitive(var.secrets.jicofo_auth_password), GLOBAL_MODULES = "muc_census", PUBLIC_URL = "https://talk.chaoswest.tv", TZ = "Europe/Berlin", XMPP_DOMAIN = "meet.jitsi", XMPP_AUTH_DOMAIN = "auth.meet.jitsi", XMPP_INTERNAL_MUC_DOMAIN = "internal-muc.meet.jitsi", XMPP_GUEST_DOMAIN = "guest.meet.jitsi", XMPP_RECORDER_DOMAIN = "recorder.meet.jitsi", XMPP_MUC_DOMAIN = "muc.meet.jitsi", } } } }