-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Code-server, podman, systemd, quadlets, socket #7073
-
Hi. I made a service using podman and systemd via quadlets. But I still have a question about one technology. I wanted to make the container run only when I access the service, for example when I go to myvps.dot/service1. After that the container/service was supposed to start. After some time of not using - the container would stop without using resources. To implement this there are two options from
https://github.com/containers/podman/blob/main/docs/tutorials/socket_activation.md
In the first case, as far as I understand, there is a limit on the number of container starts - so you can start only 1 container/service.
I went the second way. But it requires that the project initially supports this (socket activation of containers).
So I have a question: does the code-server project support this or am I setting something wrong?
Beta Was this translation helpful? Give feedback.
All reactions
If I understand correctly, this meant to start/stop a container on demand? From my brief reading it seems like it would be possible to do:
systemd-socket-activate -l 8080 podman run --rm --network=none codercom/code-server
But I am not sure.
To answer your question, no, we do not have any kind of socket activation. We do have a wrapper that only starts VS Code processes when we get the first HTTP request though.
Replies: 1 comment 1 reply
-
If I understand correctly, this meant to start/stop a container on demand? From my brief reading it seems like it would be possible to do:
systemd-socket-activate -l 8080 podman run --rm --network=none codercom/code-server
But I am not sure.
To answer your question, no, we do not have any kind of socket activation. We do have a wrapper that only starts VS Code processes when we get the first HTTP request though.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you! This information was really important to me!
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 1