docs: clean up English (#3324)

Fix issues from #3319 and #3320
This commit is contained in:
Ammar Bandukwala
2022-07-31 20:06:05 +00:00
committed by GitHub
parent 70bf66e030
commit f82df1bd78
5 changed files with 50 additions and 68 deletions
+10 -14
View File
@@ -98,11 +98,7 @@ inherited by all child processes of the agent, including SSH sessions.
#### startup_script
Use the Coder agent's `startup_script` to run additional commands like
installing IDEs and clone dotfile and project repos. In this example, the
project and dotfile repos are specified as Terraform input variables elsewhere
in the `main.tf` Note the `&` after the `code-server` start to execute
`code-server` process in the background so the `startup_script` can continue
with the repo cloning steps.
installing IDEs, [cloning dotfile](./dotfiles.md#templates), and cloning project repos.
```hcl
resource "coder_agent" "coder" {
@@ -113,9 +109,16 @@ resource "coder_agent" "coder" {
#!/bin/bash
# install code-server
curl -fsSL https://code-server.dev/install.sh | sh
curl -fsSL https://code-server.dev/install.sh | sh
# The & prevents the startup_script from blocking so the
# next commands can run.
code-server --auth none --port &
# var.repo and var.dotfiles_uri is specified
# elsewhere in the Terraform code as input
# variables.
# clone repo
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
git clone --progress git@github.com:${var.repo}
@@ -123,17 +126,10 @@ git clone --progress git@github.com:${var.repo}
# use coder CLI to clone and install dotfiles
coder dotfiles -y ${var.dotfiles_uri}
EOT
EOT
}
```
#### Logging
The output of the `startup_script` are located in
`/tmp/coder-startup-script.log` within the workspace.
The Coder agent log is located in `/tmp/coder-agent.log` within the workspace.
### Parameters
Templates often contain _parameters_. These are defined by `variable` blocks in