| #!/bin/bash |
| set -e |
|
|
| |
| |
| NGX_NAME="${NGX_NAME:-admin}" |
| NGX_PASS="${NGX_PASS:-admin}" |
| PORT="${PORT:-7860}" |
|
|
| |
| CRYPTPASS=$(openssl passwd -apr1 "${NGX_PASS}") |
| echo "${NGX_NAME}:${CRYPTPASS}" > /root/app/ngpasswd |
|
|
| echo "Login configured as: $NGX_NAME" |
|
|
| |
| |
| COMMIT=$(cat /opt/openvscode-server/product.json | jq -r .commit) |
| sed -i "s/#COMMIT#/$COMMIT/g" /root/app/nginx.conf |
| sed -i "s/#PORT#/$PORT/g" /root/app/nginx.conf |
|
|
| |
| nginx -c /root/app/nginx.conf |
|
|
| |
| |
| echo "Starting HF dataset sync to /root/app/data..." |
| python3 /root/app/scripts/sync_hf.py --destination /root/app/data & |
|
|
| |
| |
| vscode="/opt/openvscode-server/bin/openvscode-server" |
|
|
| echo "Launching VSCode with Absolute Root access..." |
| exec $vscode \ |
| --host 0.0.0.0 \ |
| --port 5050 \ |
| --without-connection-token \ |
| --working-dir / \ |
| --user-data-dir /root/.vscode-server \ |
| --extensions-dir /root/.vscode-server/extensions \ |
| "${@}" |
|
|