Skip to content

Instantly share code, notes, and snippets.

@ulve
Created February 2, 2016 20:19
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ulve/d6bbb8bafaa3d8292fa2 to your computer and use it in GitHub Desktop.
Save ulve/d6bbb8bafaa3d8292fa2 to your computer and use it in GitHub Desktop.
Connect to remote phoenix node with observer
# On the phoenix node
# if production mode
MIX_ENV=prod PORT=4001 elixir --name phoenix@127.0.0.1 --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -pa _build/prod/consolidated -S mix phoenix.server
# if debug mode
elixir --name phoenix@127.0.0.1 --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -S mix phoenix.server
# On the observing node
# Terminal 1, start SSH tunnel
ssh -N -L 9001:localhost:9001 -L 4369:localhost:4369 pi@192.168.1.31
# Terminal 2, start observer
erl -name debug@127.0.0.1 -setcookie 123 -run observer
# then in observer window, connect to phoenix@127.0.0.1
@ku1ik
Copy link

ku1ik commented May 31, 2017

Is -pa _build/prod/consolidated necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment