Skip to content

Commit eca1704

Browse files
authored
Merge pull request #87 from lrstanley/feature/directory-override
add DEFAULT_WORKSPACE support to override default workspace
2 parents 992c04e + 6a7313b commit eca1704

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

readme-vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ opt_param_env_vars:
5353
- { env_var: "SUDO_PASSWORD", env_value: "password", desc: "If this optional variable is set, user will have sudo access in the code-server terminal with the specified password." }
5454
- { env_var: "SUDO_PASSWORD_HASH", env_value: "", desc: "Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`." }
5555
- { env_var: "PROXY_DOMAIN", env_value: "code-server.my.domain", desc: "If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#sub-domains)" }
56+
- { env_var: "DEFAULT_WORKSPACE", env_value: "/config/workspace", desc: "If this optional variable is set, code-server will open this directory by default" }
5657

5758
optional_block_1: false
5859
optional_block_1_items: ""
@@ -76,6 +77,7 @@ app_setup_block: |
7677
7778
# changelog
7879
changelogs:
80+
- { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }
7981
- { date: "29.11.21:", desc: "Rebase to Ubuntu focal." }
8082
- { date: "16.09.21:", desc: "Fix slow `chown` on large workspace (contents of workspace folder no longer chowned)." }
8183
- { date: "11.07.21:", desc: "Bump node to 14 to fix builds" }

root/etc/services.d/code-server/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ exec \
2222
--disable-telemetry \
2323
--auth "${AUTH}" \
2424
"${PROXY_DOMAIN_ARG}" \
25-
/config/workspace
25+
"${DEFAULT_WORKSPACE:-/config/workspace}"

0 commit comments

Comments
 (0)