Closed tim-millar closed 4 years ago
Overmind sets PORT
env variable for each process as is described here. It's a common behavior for the most Procfile launchers. Looks like your Action Cable initializer uses this variable.
but, can we override? For example, in this Procfile:
web: bundle exec rails s
cypress: CYPRESS_BASE_URL=http://${APP_DOMAIN}:${PORT} yarn cypress open --project ./spec
anycablego: anycable-go --host=$ANYCABLE_DOMAIN --port=$ANYCABLE_PORT
the web
and cypress
processes should have the SAME value for PORT. Is there a way to have overmind just respect the contents of the specified .env
?
EDIT: I did this, which accomplished what I want:
PORT=7780
APP_DOMAIN=127.0.0.1
RAILS_ENV=test
OVERMIND_PORT=7780
OVERMIND_PORT_STEP=0
@lastobelus that's helpful - I set
+PORT=3000
+OVERMIND_PORT=3000
+OVERMIND_PORT_STEP=0
in .overmind.env
, which solved the problem.
Having an issue where we set the action cable domain and port in an initializer, but overmind (seemingly) keeps the domain but overrides the port and sets it to 5100.
We are starting the rails server in a procfile like this:
bin/rails server -p 3000
We're expecting action cable to be accessed on the same port