Installing Visual Studio Codeserver on Glitch

Could you share your workaround so?

Ok, Iโ€™ll share the repl

Sorry, but at the moment users cannot use apt or sudo.

1 Like

@code-alt do let us know how it turns out on Repl.it!

2 Likes


โ“˜ ๐—ข๐—ณ๐—ณ๐—ถ๐—ฐ๐—ถ๐—ฎ๐—น ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐˜€๐˜๐—ฎ๐˜๐—ฒ๐—ฑ ๐˜๐—ต๐—ฎ๐˜ ๐˜๐—ต๐—ถ๐˜€ ๐—ถ๐˜€ ๐—ณ๐—ฎ๐—น๐˜€๐—ฒ ๐—ฎ๐—ป๐—ฑ ๐—บ๐—ถ๐˜€๐—น๐—ฒ๐—ฎ๐—ฑ๐—ถ๐—ป๐—ด

๐—ข๐—ณ๐—ณ๐—ถ๐—ฐ๐—ถ๐—ฎ๐—น ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ = @javaarchive

5gb should be enough @javaarchive right?

I was wondering if everyone was ignoring this because there was something wrong with it. But it worked for me. I was able to install it with their standalone package:

#!/bin/sh -eux
CS_VERSION=3.7.1
if [ -x ~/.local/bin/code-server ]; then
  exit 0
fi
mkdir -p ~/.local/bin
cd /tmp
wget "https://github.com/cdr/code-server/releases/download/v$CS_VERSION/code-server-$CS_VERSION-linux-amd64.tar.gz"
tar -xf "code-server-$CS_VERSION-linux-amd64.tar.gz"
ln -s "/tmp/code-server-$CS_VERSION-linux-amd64/bin/code-server" ~/.local/bin/

Anyway, it uses plenty of memory, but itโ€™s still within parameters for an un-boosted project. Dunno how fast it grows with a larger project open though.

It takes about 300 MB on disk, which seems to be no sweat as long as youโ€™re outside of /app.

app@sugary-internal-mascara:~ 01:23 
$ du -sh /tmp/code-server-3.7.1-linux-amd64
300M    /tmp/code-server-3.7.1-linux-amd64

app@sugary-internal-mascara:~ 01:32 
$ df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       49G   21G   28G  43% /tmp

Canโ€™t let the public see this demo because then they would be able to trash the project. But you could remix it and do cat /tmp/code-server-config.yaml to see the password for logging in to your own copy.

Some caveats:

  1. Setting PASSWORD as an environment variable is broken in this version of code-server. so I rigged it up to use a config file in /tmp.
  2. This takes up the www port that Glitch serves for you, so maybe (i) try out this GitHub - coder/code-server: VS Code in the browser hosted solution, (ii) set up a reverse proxy, or (iii) just work on something that isnโ€™t a website.

Thanks for highlighting this thread @RiversideRocks

7 Likes

I wrote a similar script, but hardcoded the version. It went boom when that certain version somehow disappeared from github

and yes since I forgot to say, I did exactly what wh0 did except the logic was slightly different and I hardcoded the version
so basically it installs into /tmp the part that doesnโ€™t change at all

3 Likes

So thatโ€™s how you got more disk space.

3 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.