File size: 647 Bytes
819ff17
 
a6c72f2
05d4a34
1aa4049
 
d87a6da
1aa4049
f97e9c6
 
9185003
 
15c36d3
 
7facd24
dc3c218
7facd24
 
 
11fb7d6
7facd24
819ff17
 
714a8e3
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
#!/bin/bash

commit=$(cat /app/openvscode-server/product.json | awk '/commit/{print $4;exit}' FS='[""]')
sed -i "s/#commit#/$commit/" nginx.conf
NGX_NAME="${NGX_NAME:-admin}"
NGX_PASS="${NGX_PASS:-admin}"
CRYPTPASS=`openssl passwd -apr1 ${NGX_PASS}`

echo "USERNAME:" $NGX_NAME
echo "PASSWORD:" $NGX_PASS

echo "${NGX_NAME}:${CRYPTPASS}" > ngpasswd
nginx -c $PWD/nginx.conf

set +e
if [[ ! -z "$REPOSITORY" ]]; then
  git clone $REPOSITORY
fi
set -e
git config --global http.postBuffer 524288000

echo "Starting VSCode Server..."

exec /app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 5050 --without-connection-token \"${@}\" --