DokployD
Dokploy14mo ago
11 replies
ElPoulpo

RabbitMQ connection impossible from another service

Hi,

I'm trying to setup RabbitMQ and connect from another service on my Dokploy managed server.

Here is the compose file:

services:
  rabbitmq:
    image: rabbitmq:4.0.4-management-alpine
    restart: unless-stopped
    environment:
      RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
      RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
    volumes: 
      - rabbitmq_data:/var/lib/rabbitmq/
    networks:
      - dokploy-network
    labels:
      - traefik.enable=true
      - traefik.http.routers.alfred-staging-message-broker-ueiasj-38-web.rule=HostSNI(`broker.example.com`)
      - traefik.http.routers.alfred-staging-message-broker-ueiasj-38-web.entrypoints=rabbitmq
      - traefik.http.services.alfred-staging-message-broker-ueiasj-38-web.loadbalancer.server.port=5672
      - traefik.http.services.alfred-staging-message-broker-ueiasj-38-web.tls.certresolver==letsencrypt
      - traefik.http.routers.alfred-staging-message-broker-ueiasj-38-web.service=alfred-staging-message-broker-ueiasj-38-web

volumes:
  rabbitmq_data:


I can connect to the rabbitmq dashboard but can't use it from my Symfony app using this DSN URL
amqp://user:password@broker.example.com:5672/%2f
Was this page helpful?