R
Railwayβ€’4mo 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
Percyβ€’4mo ago
Project ID: e269f5dd-f1fb-40f1-9ea5-9b0a20b1c53a
Smadger
SmadgerOPβ€’4mo ago
e269f5dd-f1fb-40f1-9ea5-9b0a20b1c53a
Brody
Brodyβ€’4mo 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
SmadgerOPβ€’4mo ago
This is the error I'm getting
No description
Brody
Brodyβ€’4mo ago
the project has no services? can you deploy a fresh rabbitmq template so i can look for the issue?
Smadger
SmadgerOPβ€’4mo 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
Brodyβ€’4mo ago
in the test env?
Smadger
SmadgerOPβ€’4mo ago
Yeah
Brody
Brodyβ€’4mo ago
do i have your permission to also test in this env?
Smadger
SmadgerOPβ€’4mo 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
Brodyβ€’4mo ago
looks like it works now check the activity panel to see what i changed
Smadger
SmadgerOPβ€’4mo ago
Do you know why the variable hasn't worked here? As I was having issues previously with environment variables
Brody
Brodyβ€’4mo ago
its namespace was wrong
Smadger
SmadgerOPβ€’4mo 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
Brodyβ€’4mo ago
looking
Smadger
SmadgerOPβ€’4mo ago
Thank you so much Feel free to make any changes to test πŸ‘
Brody
Brodyβ€’4mo 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
SmadgerOPβ€’4mo 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
Brodyβ€’4mo ago
thats all there is to the dockerfile in the rabbitmq folder?
Smadger
SmadgerOPβ€’4mo 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
Brodyβ€’4mo 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
SmadgerOPβ€’4mo 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
Brodyβ€’4mo ago
yeah its working now, so ill explain
Solution
Brody
Brodyβ€’4mo 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
SmadgerOPβ€’4mo ago
Oh, amazing thank you. Very useful to know!
Brody
Brodyβ€’4mo ago
no problem, let me know if you have any more questions!
Smadger
SmadgerOPβ€’4mo ago
Shall do thank you
Brody
Brodyβ€’4mo ago
no problem!
Want results from more Discord servers?
Add your server