I have a dockerfile that creates a RabbitMQ server for me with the following command
docker run -dp 127.0.0.1:3000:3000 -p 5672:5672 -p 15672:15672 keycloak-rabbit-local
How do I translate this to a fly deployment?
previously, I’ve tried using the following fly.toml
# fly.toml app configuration file generated for keycloak-rabbit on 2023-10-23T14:22:39+01:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # app = "keycloak-rabbit" primary_region = "lhr" [build] dockerfile = "Dockerfile" # rabbitmq main [[services]] http_checks =  internal_port = 5672 protocol = "tcp" script_checks =  [[services.tcp_checks]] grace_period = "1s" interval = "15s" restart_limit = 0 timeout = "60s" # rabbitmq admin [[services]] http_checks =  internal_port = 15672 protocol = "tcp" script_checks =  [[services.ports]] handlers = ["http", "tls"] port = "15672" [[services.tcp_checks]] grace_period = "1s" interval = "15s" restart_limit = 0 timeout = "60s"
my dockerfile and prod.conf
FROM rabbitmq:3-management-alpine COPY ./prod.conf /etc/rabbitmq/rabbitmq.conf RUN rabbitmq-plugins enable rabbitmq_management
# rabbitmq config file listeners.tcp.default = 5672 default_user = username default_pass = password default_vhost = host log.file.level = warning log.console.level = warning
But when I go to access myflyurl:15672, I get ERR_CONNECTION_RESET, which I think I expect, because then I fly proxy 15672, but I get the same message.
With this dockerfile, I found that using
-p 5672:5672 -p 15672:15672 was crucial to getting the management interface to appear on 15672, so I need that for the fly deployment, however I thought the set up in the fly.toml would be enough but I’ve clearly missed something.