You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to run Coder on a small VM in the cloud, and only spin up workstation VMs once required (with devcontainers inside the VM). However, when someone is working on multiple projects at a time, it seems overkill to me to use one VM for each opened devcontainer.
So I would like to provision one VM per user and spin up a devcontainer in that VM for every workspace. I almost had this figured out:
One GCP VM Instance per user, reused across devcontainers
Coder Agent running inside each devcontainer
A script running on the VM that checks the amount of running docker containers, if 0 then shutdown the VM when none is started within 5 minutes.
Volume linked to the workspace directory so that it can be deleted together with a coder workspace
With this I thought I had it, but I realized that upon deletion the VM will also be deleted. Besides that, there is no way to start a devcontainer if the VM is already started (normally you would use the meta startup script).
So is there any way to run multiple containers/workspaces on the same VM, while also managing that same VM so that it stops when no workspaces are in use?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
I want to be able to run Coder on a small VM in the cloud, and only spin up workstation VMs once required (with devcontainers inside the VM). However, when someone is working on multiple projects at a time, it seems overkill to me to use one VM for each opened devcontainer.
So I would like to provision one VM per user and spin up a devcontainer in that VM for every workspace. I almost had this figured out:
With this I thought I had it, but I realized that upon deletion the VM will also be deleted. Besides that, there is no way to start a devcontainer if the VM is already started (normally you would use the meta startup script).
So is there any way to run multiple containers/workspaces on the same VM, while also managing that same VM so that it stops when no workspaces are in use?
Beta Was this translation helpful? Give feedback.
All reactions