From eb7eaa456ae810a2654ba90f99da2c9abd91daa7 Mon Sep 17 00:00:00 2001 From: n-i-x <440158+n-i-x@users.noreply.github.com> Date: Tue, 19 May 2020 23:06:47 -0400 Subject: [PATCH] Add --proxy-domain support --- root/etc/services.d/code-server/run | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/root/etc/services.d/code-server/run b/root/etc/services.d/code-server/run index 94896c6..2e91f05 100644 --- a/root/etc/services.d/code-server/run +++ b/root/etc/services.d/code-server/run @@ -1,19 +1,30 @@ #!/usr/bin/with-contenv bash +# Added by codeserver-golang +export PATH=$PATH:/usr/local/go/bin + if [ -n "${PASSWORD}" ]; then AUTH="password" else AUTH="none" echo "starting with no password" fi + code-server: + +if [ -z ${PROXY_DOMAIN+x} ]; then + PROXY_DOMAIN_ARG="" +else + PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}" +fi exec \ - s6-setuidgid abc \ - /app/code-server/code-server \ - --bind-addr 0.0.0.0:8443 \ - --user-data-dir /config/data \ - --extensions-dir /config/extensions \ - --disable-telemetry \ - --disable-updates \ - --auth "${AUTH}" \ - /config/workspace + s6-setuidgid abc \ + /app/code-server/code-server \ + --bind-addr 0.0.0.0:8443 \ + --user-data-dir /config/data \ + --extensions-dir /config/extensions \ + --disable-telemetry \ + --disable-updates \ + --auth "${AUTH}" \ + "${PROXY_DOMAIN_ARG}" \ + /config/workspace