mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: update template examples and docs to install code-server under /tmp (#6138)
Updates templates examples and docs to pass the --method standalone argument to code-server install script, and installs code-server under /tmp/code-server. Co-authored-by: Mathias Fredriksson <mafredri@gmail.com> --------- Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This commit is contained in:
co-authored by
Mathias Fredriksson
parent
4432cd08d6
commit
ab9cba9396
+8
-5
@@ -160,12 +160,15 @@ resource "coder_agent" "coder" {
|
||||
startup_script = <<EOT
|
||||
#!/bin/bash
|
||||
|
||||
# install code-server 4.8.3
|
||||
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
|
||||
# Install code-server 4.8.3 under /tmp/code-server using the "standalone" installation
|
||||
# that does not require root permissions. Note that /tmp may be mounted in tmpfs which
|
||||
# can lead to increased RAM usage. To avoid this, you can pre-install code-server inside
|
||||
# the Docker image or VM image.
|
||||
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.8.3
|
||||
|
||||
# The & prevents the startup_script from blocking so the
|
||||
# next commands can run.
|
||||
code-server --auth none --port &
|
||||
# The & prevents the startup_script from blocking so the next commands can run.
|
||||
# The stdout and stderr of code-server is redirected to /tmp/code-server.log.
|
||||
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
|
||||
|
||||
# var.repo and var.dotfiles_uri is specified
|
||||
# elsewhere in the Terraform code as input
|
||||
|
||||
Reference in New Issue
Block a user