Spaces:
Running
Running
VSCode saves things to `/data` when it exists
Browse files- start_server.sh +11 -2
start_server.sh
CHANGED
@@ -1,5 +1,14 @@
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
# Default workspace directory
|
4 |
+
WORKSPACE_DIR="/app"
|
5 |
|
6 |
+
# Check if /data exists and is writable
|
7 |
+
if [ -d "/data" ] && [ -w "/data" ]; then
|
8 |
+
WORKSPACE_DIR="/data"
|
9 |
+
fi
|
10 |
+
|
11 |
+
echo "Starting VSCode Server on $WORKDIR_PATH..."
|
12 |
+
|
13 |
+
# Use the determined directory as the base path for the VS Code server
|
14 |
+
exec /app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 7860 --without-connection-token "${@}" --extensions-dir "$WORKDIR_PATH/.vscode-server/extensions" --user-data-dir "$WORKDIR_PATH/.vscode-server/data" --
|