Question

How to run RabbitMQ in DO App Platform with 2 exposed ports

I’d like to run Rabbit MQ as a separate App that will be used by other apps. So far, I was able to run Rabbit MQ and access the management console on port 15672. The problem that I’m facing right now is that I can’t expose the TCP port 5672 so other Apps would be able to connect to it.

Here’s the yaml:

services:
- name: mq
  http_port: 15672
  internal_ports:
  - 5672
  instance_count: 1
  instance_size_slug: basic-xs
  image:
    registry: library
    registry_type: DOCKER_HUB
    repository: rabbitmq
    tag: 3.11.14-management
  health_check:
    port: 5672
    initial_delay_seconds: 120

How can I expose not only 15672 but also 5672 at the same time?

I understand that I could also set up an App with multiple services and connect internally to Rabbit MQ. Unfortunately, my project has multiple services that are exposed on individual subdomains, and afaik, the App Spec doesn’t allow specifying domains on a per-service basis. Domains can be only specified for the whole App.

Unless I misunderstood the App Spec, this is a huge limitation.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
May 14, 2023

Hey @chriskalmar,

Indeed, this might not be possible as of the time being. But on another note, I would personally suggest running services like RabbitMQ and Kafka on a Droplet rather than the App Platform as the App Platform storage is ephemeral meaning that all of the changes that you make to the local file system will be lost after a new deployment.

What you could do is run your RabbitMQ service on a Droplet and then use the Droplet’s IP address to connect to it from your web apps deployed on the App Platform.

If you want to see this as a feature, the best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

https://ideas.digitalocean.com/

Hope that helps!

- Bobby.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel