Code Server Is An AWESOME Replacement for VS Code!
Vložit
- čas přidán 3. 07. 2024
- Code Server centralises VS Code! No longer do you need to install it on each of your machines, simply access it through your web browser! It's the perfect companion for homelabbing and coding.
Code Server Docker Compose:
github.com/JamesTurland/JimsG...
Recommended Hardware: github.com/JamesTurland/JimsG...
Discord: / discord
Twitter: / jimsgarage_
Reddit: / jims-garage
GitHub: github.com/JamesTurland/JimsG...
00:00 - Code Server vs CS Code
02:28 - Code Server Overview
02:56 - Docker Compose Overview
04:48 - Docker Deployment
06:20 - Code Server GUI & Configuration
07:21 - Connect to GitHub
09:31 - Add Username and Email
10:30 - Commit, Push, Pull from GitHub
12:30 - Outro - Věda a technologie
this video changed my entire dev env thank you. this solves so many of my portability and consistency issues
That's awesome! :)
Great to see your channel growing at a steady pace. Love your vids :)
Thanks for the support, glad you like them!
I've had a github page for years but never really did anything with it. That just changed with this video. Thanks, Jim!
You're welcome 😁
You’re doing a great job - Keep it on 🎉
Thanks 👍 have a great weekend
Another one useful and well documented video, thanks.
Thanks, Mike
Awesome video. Thanks.
You're welcome 😁
The way you explain the content is really amazing. Enjoy watching your content. Thanks for the video🎉
I appreciate that!
Hey Jim great job with the Video. With regards to Code server you can set it up with your homelab Yaml files and create folders and delete files just like you would when you access the folder. That way you don't really need a separate file manager or so when accessing your docker directory and it works as a one stop place for everything. Cheers
Certainly, if it's a bind mount then you have access to the file structure. Any changes are reflected in the workspace (might just need to be careful of permissions).
@@Jims-Garageyea I have a question on that. If my code server instance is limited to my homelab is there any issues giving it a root access?
@@mesharetelohim it's always good practice not to, but it'll be fine if it's just internally available.
Great video ! Can you give more details about the reverse proxy part?
Take a look at my Traefik video, that should outline how it works and why it's useful to have.
Will this support remote-ssh? I do a lot of development on different machines and remote-ssh comes in handy. If its supported, how does one make it work?
One problem I have with code serve on dokcer is that whenever I'm working with HTML files and I want to use the Live Server extension to see my changes i real time I cant, because It's through docker uses a diferrent port. Any idea how I can come around that?
Should be possible if you follow these instructions: github.com/coder/code-server/discussions/4963
This is awesome.
Do you have videos that explain how to set up the proxy you are using?
Yes, check out my Traefik video earlier in the series
@@Jims-GarageThank you, I did find it, basically I started with this video, and that led me to "Oooo, what is Traefik", and I found that one (I have since replaced Nginx on one of our small demo servers with Traefik, the labels makes configuration a whole lot simpler"...
That video led me to "ooo what is Portainer", and I got that installed, although to be honest I will probably only use it to look at logs.
I am now back at getting Code-Server to work, it is running, but I want npm and dotnet.
They, I guess would need to be installed inside the container.
can we run php artisan serve (Laravel PHP) in terminal (which normally run on localhost) ?
how do i make it login with my microsoft account?
Can you use the hosted coder server instance to then connect to a remote VS code instance via SSH (like you can do in VS Code)?
It's possible but it's not pretty to do it.
Thank again for your video sir. Quick question if i may, i previously installed it on one of my server (ubuntu server 22.04 with docker and portainer) but when i tried to "compose up" a file it would tell me that docker wasn t installed... never managed to fix this, would you have an input by any chance?
I assume you have installed Docker and Docker Compose?
@@Jims-Garage oh yes definitely. I can compose and deploy containers on the servers with my vs code wish ssh (from my windows computer) or directly on the server on ssh, but when trying to deploy a container via codeserver installed on a container it give me that message on the terminal "bin/bash... docker is not installed"
@@Robertjaymercer I see what you mean, sorry I misunderstood. I believe you can do it following these instructions: coder.com/docs/code-server/latest/FAQ#can-i-use-docker-in-a-code-server-container
@@Jims-Garage thank you for your time sir, will check it out!
Yeah its good to edit text files using the stuff from vscode. But not sure that this is the replacement for vscode application. It has most of the things from a development perspective but it doesn't have the development environment. I'm assuming in order to get this to work in the way that I'm thinking is that you will need to run the code server in each of your development enviroments. So if you have a server for node related work, then you will need to have docker and this image running to take advantage of running your project. Which probably then begs the question - why not use vscode desktop app (single install) and remote-ssh into your development environments/servers ?
They also have a project, Coder, that "enables organizations to set up development environments in the cloud. Environments are defined with Terraform, connected through a secure high-speed Wireguard tunnel, and are automatically shut down when not in use to save on costs."
Basically cool, but without "remote ssh" and "remote explorer" it´s not really the same. I have two ssh jumpserver that are only allowed to access my remote machines and I would like to get it integrated. Maybe in combination with the docker-based openssh-server.
True, I believe you can do the following, however:
"You can't use Remote SSH on code-server since code-server itself is (kinda) a Remote SSH session. Instead, if you gain access to the system, you can:
Get a DE like Xfce
Get VNC server/Xrdp and use it to connect to your deployment's GUI.
Then you can install VS Code, get the Remote SSH extension and use it."
Hey Jim. I’m a Rails developer. I’m keen to set up Code Server and do light development through my iPad. I need to run my test suite in a Docker container via the terminal - any suggestions on an optimal configuration for this please? I don’t mind spending a bit of money. The hosted solutions I’ve checked out so far don’t seem to allow the building of containers
Hey, welcome. Just so I understand, are you looking to deploy the container from the code-server container via the GUI terminal?
If so, it's possible but it's not an elegant solution. Here are some options reddit.com/r/docker/s/C0RiZFJehy
Has anyone used it with Alpine without any problems?
Can you provide any solutions for extensions ? There are multiple extensions that i want to use, but i can't use them 😔
What's the issue?
We can't use live server , live preview and many others
It shows: *The 'Language PL/SQL' extension is not available in code-server for Web.*
Here i was trying pl/sql extension
@@Evil6_9 I haven't actually used that extension before, I'll take a look.
Where should I put my own code on a Linux machine? It should be somewhere in ~/?
What is the "best practice" in this matter?
There's no single answer as it depends on what you're doing. For instance, mine is on my NAS for redundancy and I have password files access controlled with ACLs
@@Jims-Garage Oh thanks. But my question is more primitive. I'm just getting started with Linux. I installed nginx and VS code-server on a separate machine that I have at home. I will work from someone else's device, not from my home. What directory should my scripts (code), my current work, usually be in? I understand that I can place my files anywhere. But still, what do people do?
@@julesbois2122 most likely the home directory but it doesn't matter
Couldn’t get to run c# or python or nothing at all. Just an online notepad basically.
Any way to get Pylance working so Python syntax highlighting is easier to read? Or any subsitute?
@Jims-Garage I can't find the Remote SSH extension in Code-server. Do you recommend any alternative extension for SSH?