We have an app with a Rails API backend and an accompanying chat server written in Node.js.
We have URLs like so:
Rails: https://stagingapi.arcadehub.co
Chat: https://staging-chat.arcadehub.co
The chat server runs a /health
check on port 4000 and the socket.io
server on port 5001.
In order for the /health
check to work, we had to make the exposed port be 4000 for SSL.
It’s not at all clear how to expose port 5001 and associate it to the chat server domain name + SSL.
Current config is:
resources:
redis:
type: redis
balancers:
chat:
service: chat
ports:
5001: 5001
4000: 4000
services:
chat:
image: 413704506032.dkr.ecr.us-east-2.amazonaws.com/arcade-chat:latest
command: ./bin/www2
health: /health
environment:
- "*"
domain: ${CHAT_HOST}
port: 4000
ports:
- 4000
- 5001
resources:
- redis
web:
build: .
command: bundle exec unicorn -c config/unicorn.rb
health: /health
port: 3000
domain: ${HOST}
environment:
- "*"
resources:
- redis
Are there any example setups for this?
The only mention of websockets on convox I can find is an old blog post from 2016 that mentions ALB, and one unanswered query in the forums.
Should we be just using the endpoint url + port number to connect for now?
convox services -a arcade2-staging
SERVICE DOMAIN PORTS
chat chat.arcade2-staging.d1e0ca97ed3e1743.convox.cloud 443:4000 5001
web web.arcade2-staging.d1e0ca97ed3e1743.convox.cloud 443:3000