| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A PoC that allows to run user-provided code in a safe environment in the cloud using ephemeral containers with Kubernetes and gVisor. Run any node project (vue, nextjs, nuxtjs, node, etc) in a sandbox and edit the code directly in the browser.
playground-sanbox4.mp4🚀 Clone any public projects from Github 🤘 Open the project directly in the browser in VSCode (openvscode) 🚢 Terminal support. Run commands in the container 👐 Run containers on any port 🎶 Get live container events ✨ Local development with Skaffold
Have a small node server on every sandboxed pod or a single server on core backend?
Nix and devbox must be installed before running this command. If you don't want to install nix, check the dependencies from ./devbox.json and make sure they are available on your host.
$ devbox shell$ k3d cluster create playground-sandbox --volume $(pwd)/tmp:/tmp/k3dvol -p"80:80@loadbalancer" -p "443:443@loadbalancer" --k3s-node-label "node=default@server:0"
$ cd frontend && pnpm install $ cd backend && pnpm install $ skaffold dev
Visit: http://127.0.0.1.nip.io
This will deploy just the backend. For the frontend, just connect it to a Vercel or a Netlify project. Frontend will be deployed on k8s.
$ cd terraform $ terraform init $ terraform apply
Make a new K8s cluster on GCP with 2 node-pools. The first one, with label node:default will be used to run the backend of the application. For the second one, enable sandbox mode and set the label node:sandbox. The taint NoSchedule: sandbox.gke.io/runtime=gvisor should be automatically activated. The second node-pool will be used to run user containers.
Then create a new filestore instance and copy the newly created IP. Replace the IP in the helm/charts/playground-sandbox/values-prod.yaml ->nfs->server
For deploing the backend manifests, run:
$ skaffold run
For opening the traefik web UI in the browser:
kubectl port-forward -n kube-system "$(kubectl get pods -n kube-system| grep '^traefik-' | awk '{print $1}')" 9000:9000
| Back | FazBrowse Home | New Git URL |