After cloning the repo:
mix deps.get
(cd assets && yarn)
mix phx.server
Now you can visit localhost:4000
from your browser.
Level 10 takes advantage of Erlang clustering for scale and uptime purposes. While in development mode, the application uses Libcluster's Gossip strategy if a node name is provided when starting the application.
Thus, clustering can be simulated by starting up the application as follows:
# In one terminal window
PORT=4000 iex --cookie level10 --name 4000 -S mix phx.server
# In a different terminal window
PORT=4001 iex --cookie level10 --name 4001 -S mix phx.server
Whenever a node is terminated gracefully with a SIGTERM (as would occur with a
normal rolling deploy), any game processes hosted on that node will be handed
off to one of the other nodes in the cluster via the Level10.StateHandoff
module. In order to simulate this with a cluster running on your local machine,
you can use the following command inside of iex for whichever node you'd like to
terminate:
:init.stop()
You can build a docker image that can run anywhere docker images can with docker build .
The official version of Level 10 runs in Digital Ocean
Kubernetes. You can do the same by tweaking a
few files in the deployment manifest and running kubectl apply -f k8s
Information about contributing can be found in CONTRIBUTING.md