services: mqttx: image: emqx/mqttx-web:v1.10.0 container_name: 'mqttx' restart: unless-stopped volumes: - ${APP_DATA_DIR}/data/mqttx:/app/data - /etc/localtime:/etc/localtime:ro ports: - ${APP_PORT}:80 networks: - tipi_main_network labels: # Main traefik.enable: true traefik.http.middlewares.mqttx-web-redirect.redirectscheme.scheme: https traefik.http.services.mqttx.loadbalancer.server.port: 80 # Web traefik.http.routers.mqttx-insecure.rule: Host(`${APP_DOMAIN}`) traefik.http.routers.mqttx-insecure.entrypoints: web traefik.http.routers.mqttx-insecure.service: mqttx traefik.http.routers.mqttx-insecure.middlewares: mqttx-web-redirect # Websecure traefik.http.routers.mqttx.rule: Host(`${APP_DOMAIN}`) traefik.http.routers.mqttx.entrypoints: websecure traefik.http.routers.mqttx.service: mqttx traefik.http.routers.mqttx.tls.certresolver: myresolver # Local domain traefik.http.routers.mqttx-local-insecure.rule: Host(`mqttx.${LOCAL_DOMAIN}`) traefik.http.routers.mqttx-local-insecure.entrypoints: web traefik.http.routers.mqttx-local-insecure.service: mqttx traefik.http.routers.mqttx-local-insecure.middlewares: mqttx-web-redirect # Local domain secure traefik.http.routers.mqttx-local.rule: Host(`mqttx.${LOCAL_DOMAIN}`) traefik.http.routers.mqttx-local.entrypoints: websecure traefik.http.routers.mqttx-local.service: mqttx traefik.http.routers.mqttx-local.tls: true