A "King of Tokyo" Game Written in Elixir, Phoenix and Phoenix Live View.
I created this app for playing one of my favorite board games in the age of social distancing. It is meant to be used in a multi person video chat app, such as Zoom.
The person who owns the game needs to point a camera at the cards and share them with the rest of the group. Every player must then go to https://theking.live and join the same room code.
To start your Phoenix server:
- Install dependencies with
mix deps.get
- Install Node.js dependencies with
yarn install --cwd assets
- Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.
-
Set up a DigitalOcean account
-
Get an API token from the API section on the sidebar and export an API token like so:
$ export DIGITALOCEAN_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Create an ssh key for the project for the project:
$ ssh-keygen -f ~/.ssh/theking
- Install Pulumi dependencies:
$ yarn --cwd infra
- Run Pulumi to associate your ssh key, create a droplet, domain and firewall:
$ mix pulumi up
-
Store the Ansible Vault password in
ansible/.vault-password
-
Run Ansible to provision the droplet:
$ mix ansible
- Build the release using edeliver:
$ mix edeliver build release
- Deploy using edeliver:
$ mix edeliver deploy release to production --version=VERSION_FROM_RELEASE_OUTPUT --start-deploy