File size: 920 Bytes
819ff17 1aa4049 d87a6da 9dc479e 1aa4049 f97e9c6 9185003 9dc479e 15c36d3 7facd24 def9b9a 9dc479e df8ed23 7facd24 e251c22 11fb7d6 7facd24 819ff17 a341539 06dd8db e251c22 06dd8db e251c22 a341539 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#!/bin/bash
NGX_NAME="${NGX_NAME:-admin}"
NGX_PASS="${NGX_PASS:-admin}"
CRYPTPASS=`openssl passwd -apr1 ${NGX_PASS}`
PORT="${PORT:-8080}"
echo "USERNAME:" $NGX_NAME
echo "PASSWORD:" $NGX_PASS
echo "${NGX_NAME}:${CRYPTPASS}" > ngpasswd
COMMIT=$(cat /app/openvscode-server/product.json | awk '/commit/{print $4;exit}' FS='[""]')
sed -i "s/#COMMIT#/$COMMIT/" nginx.conf
sed -i "s/#PORT#/$PORT/" nginx.conf
nginx -c $PWD/nginx.conf
set +e
if [[ ! -z "$REPO" ]]; then
echo start to clone initial repo $repo
git clone --progress $REPO
fi
git config --global http.postBuffer 524288000
echo "Starting VSCode Server..."
vscode=/app/openvscode-server/bin/openvscode-server
vscode_cli=/app/openvscode-server/bin/remote-cli/openvscode-server
$vscode --install-extension ms-toolsai.jupyter
ln -s $vscode_cli $(dirname $vscode_cli)/code
set -e
exec $vscode --host 0.0.0.0 --port 5050 --without-connection-token \"${@}\" --
|