31 lines
807 B
Plaintext
Raw Normal View History

2019-06-24 14:03:06 -04:00
#!/usr/bin/with-contenv bash
2020-05-19 23:06:47 -04:00
# Added by codeserver-golang
export PATH=$PATH:/usr/local/go/bin
2019-06-24 15:27:16 -04:00
if [ -n "${PASSWORD}" ]; then
2019-10-24 16:28:48 -04:00
AUTH="password"
2019-06-24 15:27:16 -04:00
else
2019-10-24 16:28:48 -04:00
AUTH="none"
2019-06-24 15:27:16 -04:00
echo "starting with no password"
fi
2020-05-19 23:06:47 -04:00
code-server:
if [ -z ${PROXY_DOMAIN+x} ]; then
PROXY_DOMAIN_ARG=""
else
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
fi
2019-06-24 15:27:16 -04:00
2019-06-24 14:03:06 -04:00
exec \
2020-05-19 23:06:47 -04:00
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