Skip to content

Commit 00afdeb

Browse files
authored
Merge pull request #30 from n-i-x/n-i-x-patch-1
Add support for --proxy-domain
2 parents b456c30 + 08841b0 commit 00afdeb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

readme-vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ opt_param_usage_include_env: true
4949
opt_param_env_vars:
5050
- { env_var: "PASSWORD", env_value: "password", desc: "Optional web gui password, if not provided, there will be no auth."}
5151
- { 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."}
52+
- { 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/doc/FAQ.md#sub-domains)" }
5253

5354
optional_block_1: false
5455
optional_block_1_items: ""
@@ -67,6 +68,7 @@ app_setup_block: |
6768
6869
# changelog
6970
changelogs:
71+
- { date: "29.05.20:", desc: "Add --domain-proxy support."}
7072
- { date: "21.05.20:", desc: "Shrink images, install via yarn, fix arm32v7 build." }
7173
- { date: "18.05.20:", desc: "Switch to multi-arch images, install via npm." }
7274
- { date: "29.04.20:", desc: "Update start arguments." }

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ else
77
echo "starting with no password"
88
fi
99

10+
if [ -z ${PROXY_DOMAIN+x} ]; then
11+
PROXY_DOMAIN_ARG=""
12+
else
13+
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
14+
fi
15+
1016
exec \
1117
s6-setuidgid abc \
1218
/usr/bin/code-server \
@@ -15,4 +21,5 @@ exec \
1521
--extensions-dir /config/extensions \
1622
--disable-telemetry \
1723
--auth "${AUTH}" \
24+
"${PROXY_DOMAIN_ARG}" \
1825
/config/workspace

0 commit comments

Comments
 (0)