fix: update tags and fix module bugs, rewrite vscode-server (#42)
parent
f066d5422d
commit
d3d9a9f135
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.2 MiB |
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
display_name: JupyterHub
|
|
||||||
description: A multi-user version of the notebook designed for companies, classrooms and research labs
|
|
||||||
icon: ../.icons/jupyter.svg
|
|
||||||
maintainer_github: coder
|
|
||||||
verified: true
|
|
||||||
tags: [helper, ide]
|
|
||||||
---
|
|
||||||
|
|
||||||
# JupyterHub
|
|
||||||
|
|
||||||
Automatically install [JupyterHub](https://jupyter.org/hub) in a workspace, and create an app to access it via the dashboard.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
TODO
|
|
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
display_name: vscode-server
|
||||||
|
description: VS Code Web - Visual Studio Code in the browser
|
||||||
|
icon: ../.icons/code.svg
|
||||||
|
maintainer_github: coder
|
||||||
|
verified: true
|
||||||
|
tags: [helper, ide, vscode, web]
|
||||||
|
---
|
||||||
|
|
||||||
|
# VS Code Web
|
||||||
|
|
||||||
|
Automatically install [Visual Studio Code Server](https://code.visualstudio.com/docs/remote/vscode-server) in a workspace using the [VS Code CLIs](https://code.visualstudio.com/docs/editor/command-line) and create an app to access it via the dashboard.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
1. Install VS Code Server with default settings:
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
module "vscode-web" {
|
||||||
|
source = "https://registry.coder.com/modules/vscode-server"
|
||||||
|
agent_id = coder_agent.example.id
|
||||||
|
accept_license = true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Install VS Code Server to a custom folder:
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
module "vscode-web" {
|
||||||
|
source = "https://registry.coder.com/modules/vscode-server"
|
||||||
|
agent_id = coder_agent.example.id
|
||||||
|
install_dir = "/home/coder/.vscode-server"
|
||||||
|
folder = "/home/coder"
|
||||||
|
accept_license = true
|
||||||
|
}
|
||||||
|
```
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
BOLD='\033[0;1m'
|
||||||
|
|
||||||
|
# Create install directory if it doesn't exist
|
||||||
|
mkdir -p ${INSTALL_DIR}
|
||||||
|
|
||||||
|
printf "$${BOLD}Installing vscode-cli!\n"
|
||||||
|
|
||||||
|
# Download and extract code-cli tarball
|
||||||
|
output=$(curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli.tar.gz && tar -xf vscode_cli.tar.gz -C ${INSTALL_DIR} && rm vscode_cli.tar.gz)
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to install vscode-cli: $output"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
printf "🥳 vscode-cli has been installed.\n\n"
|
||||||
|
|
||||||
|
echo "👷 Running ${INSTALL_DIR}/bin/code serve-web --port ${PORT} --without-connection-token --accept-server-license-terms in the background..."
|
||||||
|
echo "Check logs at ${LOG_PATH}!"
|
||||||
|
${INSTALL_DIR}/code serve-web --port ${PORT} --without-connection-token --accept-server-license-terms >${LOG_PATH} 2>&1 &
|
@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
display_name: vscode-web
|
|
||||||
description: VS Code Web - Visual Studio Code in the browser
|
|
||||||
icon: ../.icons/code.svg
|
|
||||||
maintainer_github: coder
|
|
||||||
verified: true
|
|
||||||
tags: [helper, ide, vscode, web]
|
|
||||||
---
|
|
||||||
|
|
||||||
# VS Code Web
|
|
||||||
|
|
||||||
Automatically install [VS Code](https://code.visualstudio.com) in a workspace, create an app to access it via the dashboard.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
1. Install VS Code Web with default settings:
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
module "vscode-web" {
|
|
||||||
source = "https://registry.coder.com/modules/vscode-web"
|
|
||||||
agent_id = coder_agent.example.id
|
|
||||||
accept_license = true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Install VS Code Web with custom version and folder
|
|
||||||
|
|
||||||
```hcl
|
|
||||||
module "vscode-web" {
|
|
||||||
source = "https://registry.coder.com/modules/vscode-web"
|
|
||||||
agent_id = coder_agent.example.id
|
|
||||||
version = "1.82.0"
|
|
||||||
folder = "/home/coder/my-projet"
|
|
||||||
accept_license = true
|
|
||||||
}
|
|
||||||
```
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
BOLD='\033[0;1m'
|
|
||||||
# check if
|
|
||||||
printf "$${BOLD}Installing VS Code!\n"
|
|
||||||
output=$(curl -L "https://update.code.visualstudio.com/${VERSION}/linux-deb-x64/stable" -o /tmp/code.deb && sudo dpkg -i /tmp/code.deb && sudo apt-get install -f -y)
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Failed to install VS Code: $output"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
printf "🥳 VS code has been installed.\n\n"
|
|
||||||
|
|
||||||
echo "👷 Running code serve-web in the background..."
|
|
||||||
echo "Check logs at ${LOG_PATH}!"
|
|
||||||
code serve-web --port ${PORT} --without-connection-token --accept-server-license-terms >${LOG_PATH} 2>&1 &
|
|
Loading…
Reference in New Issue