2019-06-24 20:03:06 +02:00
|
|
|
#!/usr/bin/with-contenv bash
|
|
|
|
|
2021-02-04 15:27:39 +01:00
|
|
|
if [ -n "${PASSWORD}" ] || [ -n "${HASHED_PASSWORD}" ]; then
|
2021-05-08 16:50:21 +02:00
|
|
|
AUTH="password"
|
2019-06-24 21:27:16 +02:00
|
|
|
else
|
2021-05-08 16:50:21 +02:00
|
|
|
AUTH="none"
|
|
|
|
echo "starting with no password"
|
2019-06-24 21:27:16 +02:00
|
|
|
fi
|
2020-05-20 05:06:47 +02:00
|
|
|
|
|
|
|
if [ -z ${PROXY_DOMAIN+x} ]; then
|
2021-05-08 16:50:21 +02:00
|
|
|
PROXY_DOMAIN_ARG=""
|
2021-02-04 15:27:39 +01:00
|
|
|
else
|
2021-05-08 16:50:21 +02:00
|
|
|
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
|
2020-05-20 05:06:47 +02:00
|
|
|
fi
|
2019-06-24 21:27:16 +02:00
|
|
|
|
2019-06-24 20:03:06 +02:00
|
|
|
exec \
|
2021-05-08 16:50:21 +02:00
|
|
|
s6-setuidgid abc \
|
2022-02-21 03:04:50 +01:00
|
|
|
/app/code-server/bin/code-server \
|
2021-05-08 16:50:21 +02:00
|
|
|
--bind-addr 0.0.0.0:8443 \
|
|
|
|
--user-data-dir /config/data \
|
|
|
|
--extensions-dir /config/extensions \
|
|
|
|
--disable-telemetry \
|
|
|
|
--auth "${AUTH}" \
|
|
|
|
"${PROXY_DOMAIN_ARG}" \
|
2021-11-05 03:51:01 +01:00
|
|
|
"${DEFAULT_WORKSPACE:-/config/workspace}"
|