Update start_server.sh
Browse files- start_server.sh +8 -4
start_server.sh
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
-
commit=$(cat /app/openvscode-server/product.json | awk '/commit/{print $4;exit}' FS='[""]')
|
| 4 |
-
sed -i "s/#commit#/$commit/" nginx.conf
|
| 5 |
NGX_NAME="${NGX_NAME:-admin}"
|
| 6 |
NGX_PASS="${NGX_PASS:-admin}"
|
| 7 |
CRYPTPASS=`openssl passwd -apr1 ${NGX_PASS}`
|
|
|
|
| 8 |
|
| 9 |
echo "USERNAME:" $NGX_NAME
|
| 10 |
echo "PASSWORD:" $NGX_PASS
|
| 11 |
|
| 12 |
echo "${NGX_NAME}:${CRYPTPASS}" > ngpasswd
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
nginx -c $PWD/nginx.conf
|
| 14 |
|
| 15 |
set +e
|
| 16 |
if [[ ! -z "$REPO" ]]; then
|
| 17 |
-
echo start to clone $
|
| 18 |
-
git clone $REPO
|
| 19 |
fi
|
| 20 |
set -e
|
| 21 |
git config --global http.postBuffer 524288000
|
|
|
|
| 1 |
+
|
| 2 |
#!/bin/bash
|
| 3 |
|
|
|
|
|
|
|
| 4 |
NGX_NAME="${NGX_NAME:-admin}"
|
| 5 |
NGX_PASS="${NGX_PASS:-admin}"
|
| 6 |
CRYPTPASS=`openssl passwd -apr1 ${NGX_PASS}`
|
| 7 |
+
PORT="${PORT:-8080}"
|
| 8 |
|
| 9 |
echo "USERNAME:" $NGX_NAME
|
| 10 |
echo "PASSWORD:" $NGX_PASS
|
| 11 |
|
| 12 |
echo "${NGX_NAME}:${CRYPTPASS}" > ngpasswd
|
| 13 |
+
|
| 14 |
+
COMMIT=$(cat /app/openvscode-server/product.json | awk '/commit/{print $4;exit}' FS='[""]')
|
| 15 |
+
sed -i "s/#COMMIT#/$COMMIT/" nginx.conf
|
| 16 |
+
sed -i "s/#PORT#/$PORT/" nginx.conf
|
| 17 |
nginx -c $PWD/nginx.conf
|
| 18 |
|
| 19 |
set +e
|
| 20 |
if [[ ! -z "$REPO" ]]; then
|
| 21 |
+
echo start to clone initial repo $repo
|
| 22 |
+
git clone --progress $REPO
|
| 23 |
fi
|
| 24 |
set -e
|
| 25 |
git config --global http.postBuffer 524288000
|