By markbarrett
Hey there,
I know that when I run some Docker containers locally using Docker Compose, if I configure it correctly, a container can access another container via its hostname.
For example, if I have two containers, a Celery Worker and a RabbitMQ container (the RabbitMQ container exposes port 5672). When the RabbitMQ container starts, I can connect to the RabbitMQ queue from the Celery container using the RabbitMQ container name, something like:
rabbitmq:5672
I tried looking for this in the DigitalOcean docs but I couldn’t find anything. Do I just use the container name the same way I would if I was running them locally?
Also, with Docker Compose, I can tell Celery to depend on RabbitMQ, i.e. it won’t start until the RabbitMQ container is up and healthy. Is that also possible with AppPlatform?
Just to add, everything I’m running all apps in Docker containers on AppPlatform.
Thanks in advance!
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!
Accepted Answer
👋 Mark,
Components within the same app can be accessed by their component name. For example, if I had a service with the name “api” that exposed an http server, it can be accessed at http://api
.
App Platform does not have the functionality to depend on other component start up times. That sounds like it could be a good feature for us to implemement though, feel free to submit it as an Idea.
Hope this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.