R
Railway3mo ago
Smadger

Deploy an app with TCP and HTTPI

I'm trying to deploy rabbitMQ which has both a TCP port an a HTTP port but you cannot expose both publicly. The example comes with a proxy but that's not working, can anyone help?
Solution:
/bin/sh -c "echo management.tcp.ip = :: >> /etc/rabbitmq/conf.d/10-defaults.conf && docker-entrypoint.sh rabbitmq-server"
/bin/sh -c "echo management.tcp.ip = :: >> /etc/rabbitmq/conf.d/10-defaults.conf && docker-entrypoint.sh rabbitmq-server"
this start command dynamically modifies the rabbitmq conf file to have the management interface listen on ipv6, instead of the default ipv4 interface. this is needed since the private network is ipv6 only....
Jump to solution
28 Replies
Percy
Percy3mo ago
Project ID: e269f5dd-f1fb-40f1-9ea5-9b0a20b1c53a
Smadger
Smadger3mo ago
e269f5dd-f1fb-40f1-9ea5-9b0a20b1c53a
Brody
Brody3mo ago
at this time you can't expose a single service via tcp and https i will look into why the template doesnt work
Smadger
Smadger3mo ago
This is the error I'm getting
No description
Brody
Brody3mo ago
the project has no services? can you deploy a fresh rabbitmq template so i can look for the issue?
Smadger
Smadger3mo ago
I'm testing around with this project as I don't want to mess with my main project e269f5dd-f1fb-40f1-9ea5-9b0a20b1c53a
Brody
Brody3mo ago
in the test env?
Smadger
Smadger3mo ago
Yeah
Brody
Brody3mo ago
do i have your permission to also test in this env?
Smadger
Smadger3mo ago
Yeah feel free I just want to be able to access both the TCP port (5672) and the HTTP management port (15672) as I need to access the API as well
Brody
Brody3mo ago
looks like it works now check the activity panel to see what i changed
Smadger
Smadger3mo ago
Do you know why the variable hasn't worked here? As I was having issues previously with environment variables
Brody
Brody3mo ago
its namespace was wrong
Smadger
Smadger3mo ago
Now, I don't want to sound stupid but I think I've replicated this exactly in my dev environment and it's not working still...
Brody
Brody3mo ago
looking
Smadger
Smadger3mo ago
Thank you so much Feel free to make any changes to test 👍
Brody
Brody3mo ago
okay so thats a bit different since this was not deployed from a template do you have a rabbitmq conf file in that monorepo?
Smadger
Smadger3mo ago
Yeah this is my custom version of rabbitMQ with a plugin added on top. Here is my dockerfile
FROM rabbitmq:3-management-alpine as rabbitmq
COPY plugins plugins
RUN rabbitmq-plugins enable rabbitmq_message_deduplication
FROM rabbitmq:3-management-alpine as rabbitmq
COPY plugins plugins
RUN rabbitmq-plugins enable rabbitmq_message_deduplication
No, there is no rabbitmq conf file
Brody
Brody3mo ago
thats all there is to the dockerfile in the rabbitmq folder?
Smadger
Smadger3mo ago
Yeah There is a plugins folder also in that rabbitmq folder which has a message deduplication plugin in and it copies it accross
Brody
Brody3mo ago
do you know what the difference is between 3-management-alpine and just management-alpine are? nvm the hash says they are the same
Smadger
Smadger3mo ago
It just specifies the latest version 3 of rabbitMQ since a new v4 is in the RC stage so is coming out soon. I just spotted the same start command difference as well :Fingers:
Brody
Brody3mo ago
yeah its working now, so ill explain
Solution
Brody
Brody3mo ago
/bin/sh -c "echo management.tcp.ip = :: >> /etc/rabbitmq/conf.d/10-defaults.conf && docker-entrypoint.sh rabbitmq-server"
/bin/sh -c "echo management.tcp.ip = :: >> /etc/rabbitmq/conf.d/10-defaults.conf && docker-entrypoint.sh rabbitmq-server"
this start command dynamically modifies the rabbitmq conf file to have the management interface listen on ipv6, instead of the default ipv4 interface. this is needed since the private network is ipv6 only.
Smadger
Smadger3mo ago
Oh, amazing thank you. Very useful to know!
Brody
Brody3mo ago
no problem, let me know if you have any more questions!
Smadger
Smadger3mo ago
Shall do thank you
Brody
Brody3mo ago
no problem!
Want results from more Discord servers?
Add your server