update docs

pull/42/head
Muhammad Atif Ali 2 years ago
parent b6d3e02e6f
commit 4de43732b9
No known key found for this signature in database

@ -9,7 +9,7 @@ tags: [helper, ide, vscode, web]
# VS Code Web # VS Code Web
Automatically install [Visual Studio Code Server](https://code.visualstudio.com/docs/remote/vscode-server) in a workspace, create an app to access it via the dashboard. 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 ## Examples
@ -20,7 +20,6 @@ Automatically install [Visual Studio Code Server](https://code.visualstudio.com/
source = "https://registry.coder.com/modules/vscode-web" source = "https://registry.coder.com/modules/vscode-web"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
accept_license = true accept_license = true
telemetry = "off"
} }
``` ```

@ -16,7 +16,7 @@ variable "agent_id" {
variable "port" { variable "port" {
type = number type = number
description = "The port to run VS Code Wbe on." description = "The port to run VS Code Web on."
default = 13338 default = 13338
} }
@ -32,20 +32,10 @@ variable "log_path" {
default = "/tmp/vscode-server.log" default = "/tmp/vscode-server.log"
} }
variable "telemetry" {
type = string
description = "Telemetry options for vscode-server."
default = "off"
validation {
condition = var.telemetry == "off" || var.telemetry == "crash" || var.telemetry == "error" || var.telemetry == "all"
error_message = "Variable telemetry must be set to 'off', 'crash', 'error' or 'all'."
}
}
variable "install_dir" { variable "install_dir" {
type = string type = string
description = "The directory to install VS Code Server" description = "The directory to install VS Code CLI"
default = "/tmp/vscode-server" default = "/tmp/vscode-cli"
} }
variable "accept_license" { variable "accept_license" {
@ -60,13 +50,12 @@ variable "accept_license" {
resource "coder_script" "vscode-server" { resource "coder_script" "vscode-server" {
agent_id = var.agent_id agent_id = var.agent_id
display_name = "vscode-server" display_name = "VS Code Web"
icon = "/icon/code.svg" icon = "/icon/code.svg"
script = templatefile("${path.module}/run.sh", { script = templatefile("${path.module}/run.sh", {
PORT : var.port, PORT : var.port,
LOG_PATH : var.log_path, LOG_PATH : var.log_path,
INSTALL_DIR : var.install_dir, INSTALL_DIR : var.install_dir,
TELEMETRY : var.telemetry,
}) })
run_on_start = true run_on_start = true
} }
@ -74,7 +63,7 @@ resource "coder_script" "vscode-server" {
resource "coder_app" "vscode-server" { resource "coder_app" "vscode-server" {
agent_id = var.agent_id agent_id = var.agent_id
slug = "vscode-server" slug = "vscode-server"
display_name = "VS Code Server" display_name = "VS Code Web"
url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}" url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}"
icon = "/icon/code.svg" icon = "/icon/code.svg"
subdomain = true subdomain = true

Loading…
Cancel
Save