How to get distillery remote console?

I’m using k8s and docker. It looks like its a bit complicated to get observer working, so I would settle for :observer_cli library which lets me run a terminal version. All I need is an iEX session.

My docker image uses distillery to run:

RUN mix do deps.get, deps.compile, compile

RUN mix release --env=prod --verbose \
    && mv _build/prod/rel/${APP_NAME} /opt/release \
    && mv /opt/release/bin/${APP_NAME} /opt/release/bin/start_server

So far I can SSH in, and I see some shell scripts from my RELEASE_ROOT, however it seems like a lot of people are able to run bin/myapp remote_console but this doesnt work for me

Do I need to enable it somehow?

I do notice locally if i run mix release it has a app_name executable… but on the server in my docker image there is only a .bat but no executable. I did find a .remote_shell.sh file hidden somewhere in the folders, but I’m not quite sure how to use it (assuming i’m ssh’d into the node)

Hmm… so I got this image from the official google tutorial

However, it says that it moves everything to /opt/release… yet when I ssh in there is no folder. There is only /opt/app. Then, inside /opt/app I have whats in my _build/prod/rel/app.

Maybe I’m crazy but I dont understand those mv commands at all, or why nothing is moved there

edit OH they rename it to start_server

LMAO the answer is just ./start_server remote_console

sigh… i have been staring at this way too long

2 Likes