-
Notifications
You must be signed in to change notification settings - Fork 6k
startup script #753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also my suggestion:
|
The reason for this is that code-server is being run by students in a docker environment (one per user), as necessary. The password information was being output with a lot of other information that is not really useful to the user. It also continuously logs to std-out other unwanted information, making it very horrible to simply run in background. Even if we start code-server automatically as a service (which we did not want), the student still needs to be able to get the password they will be using. So even then, a script to report that password easily was needed. And finally localhost was not the correct URL for the student to put into their browser! @fbartels Thanks for the tip about Gist didn't know about it. |
If you're looking to run code-server for many students at once, I'd recommend generating a random password yourself and then passing it as an environment variable to code-server. Then the password would be consistent between runs. If you also kept the hostname/port details the same for each student, then you could just email the student their details one-time or something instead of them having to get a new password each time. |
That's what I exactly thought as well @deansheather, I also recommend using VMs if your systems are designed to be type 1 hypervisors for your students. |
@deansheather @sr229 [Service] ExecStart=/path/to/codeserver/binary --allow-http --password=xxxxxxx cert=/path/fullchain.pem cert-key=/path/fullchain.pem [Install] But it doesn't work with the password. How can I improve this code to make it work? Also, I would like to add my letsencrypt certificate to secure it. Thanks |
@Josh-Uvi please open a new issue as this is unrelated. |
@Josh-Uvi thank you for the systemd service file, I have noted it for possible use in the future. |
@Josh-Uvi I have my service file free to download at https://merith.tk/vscode.service just tweak it to your needs and you should do well |
I used this script to start on alpine linux machine. |
The start-code-server script is now used to start code-server in a php:7.3-apache container, extracting and reporting the random password it generates to the "docker service logs" for that container. The Container control program pick up the password from there to pass on to the containers owner as needed. |
We're gonna take care of this soon. Duplicate of #164 |
The following is a script I wrote to start code-server in the background,
or if already running, to report the current password needed to connect to it.
With options to KILL or WATCH and KILL the code-server on shell exit.
Ideas and suggestions are welcome...
start-code-server
The text was updated successfully, but these errors were encountered: