26 lines
542 B
Plaintext
Raw Normal View History

2019-06-24 14:03:06 -04:00
#!/usr/bin/with-contenv bash
2021-02-04 15:27:39 +01:00
if [ -n "${PASSWORD}" ] || [ -n "${HASHED_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
if [ -z ${PROXY_DOMAIN+x} ]; then
PROXY_DOMAIN_ARG=""
2021-02-04 15:27:39 +01:00
else
2020-05-19 23:06:47 -04:00
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 \
2019-06-24 15:27:16 -04:00
s6-setuidgid abc \
2020-09-02 04:11:32 -04:00
/usr/local/bin/code-server \
2020-04-29 18:45:31 -04:00
--bind-addr 0.0.0.0:8443 \
2019-10-24 15:51:46 -04:00
--user-data-dir /config/data \
--extensions-dir /config/extensions \
2019-06-24 15:27:16 -04:00
--disable-telemetry \
2019-10-24 16:28:48 -04:00
--auth "${AUTH}" \
2020-05-29 10:25:32 -04:00
"${PROXY_DOMAIN_ARG}" \
2019-06-24 15:27:16 -04:00
/config/workspace