TODO
HTTPS Setup (Needed for WebRTC)
minikube start
mkcert hexcall.example
kubectl -n kube-system create secret tls mkcert --key hexcall.example-key.pem --cert hexcall.example.pem
minikube addons configure ingress
# Enter kube-system/mkcert
minikube addons enable ingressInstall Stunner
helm repo add stunner https://l7mp.io/stunner
helm repo update
helm install stunner stunner/stunner --create-namespace --namespace=stunner-systemUse Manifests
minikube dashboard --url # Nice to have, not required
kubectl apply -f ./k8s/db.yaml
kubectl apply -f ./k8s/service_account.yaml
kubectl apply -f ./k8s/stunner.yaml
# Update ICE_URL to the ip of the udp_gateway(for minikube)
kubectl get svc -n stunner
kubectl apply -f ./k8s/hexcall.yamlFinally add local dns bypass for the selfsigned cert to your /etc/hosts
echo "$(minikube ip) hexcall.example"
# Add to /etc/hosts
sudo nano /etc/hostsYou should be able to access the application on https://hexcall.example
Set SECRET_KEY_BASE first:
export SECRET_KEY_BASE=$(mix phx.gen.secret)Start a local postgres instance:
docker run --name postgres \
--detach \
--publish 5432:5432 \
-e POSTGRES_HOST_AUTH_METHOD=trust \
--mount type=tmpfs,destination=/tmp/postgresql/data \
postgresRun server with
mix phx.serveror inside IEx with
iex -S mix phx.serverBuild with:
docker build .Run (adjust env as needed):
docker run --rm \
--network="host" \
-e PHX_HOST=localhost \
-e DATABASE_URL="ecto://postgres:postgres@localhost/hexcall_dev" \
-e SECRET_KEY_BASE=TiBFjhsHAWALNyNKhuVd7fMJ+ARH13hQzGRv3+wWsq/XCICB2YhmvajzJjAaqDRo \
hexcallAdjust .env, then:
docker compose up