Merge pull request #30 from n-i-x/n-i-x-patch-1

Add support for --proxy-domain
This commit is contained in:
aptalca 2020-05-29 13:50:10 -04:00 committed by GitHub
commit 00afdeb441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -49,6 +49,7 @@ opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "PASSWORD", env_value: "password", desc: "Optional web gui password, if not provided, there will be no auth."}
- { 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."}
- { 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)" }
optional_block_1: false
optional_block_1_items: ""
@ -67,6 +68,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "29.05.20:", desc: "Add --domain-proxy support."}
- { date: "21.05.20:", desc: "Shrink images, install via yarn, fix arm32v7 build." }
- { date: "18.05.20:", desc: "Switch to multi-arch images, install via npm." }
- { date: "29.04.20:", desc: "Update start arguments." }

View File

@ -7,6 +7,12 @@ else
echo "starting with no password"
fi
if [ -z ${PROXY_DOMAIN+x} ]; then
PROXY_DOMAIN_ARG=""
else
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
fi
exec \
s6-setuidgid abc \
/usr/bin/code-server \
@ -15,4 +21,5 @@ exec \
--extensions-dir /config/extensions \
--disable-telemetry \
--auth "${AUTH}" \
"${PROXY_DOMAIN_ARG}" \
/config/workspace