Skip to content

Instantly share code, notes, and snippets.

@x-ji
Created December 12, 2019 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x-ji/f714e30e62696ee3b1af80880a56f044 to your computer and use it in GitHub Desktop.
Save x-ji/f714e30e62696ee3b1af80880a56f044 to your computer and use it in GitHub Desktop.
Markdium-Elixir process orchestration in Kubernetes with libcluster and swarm
# In Dockerfile:
ENTRYPOINT ["/opt/app/docker-entrypoint-dev.sh"]
# In docker-entrypoint-dev.sh:
if [ -z ${NODE_IP+x} ]; then
export NODE_IP="$(hostname -i | cut -f1 -d' ')"
fi
elixir --name yourapp@${NODE_IP} --cookie "your_dev_erlang_cookie" -S mix phx.server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment