vscode / start_server.sh
Tony-ooo's picture
Improve password security by using environment variables with fallback to default password
f4ff108
raw
history blame contribute delete
452 Bytes
#!/bin/bash
# Create data directory if it doesn't exist
mkdir -p /data
# Set password from environment variable, with fallback to default
export PASSWORD="${PASSWORD:-huggingface}"
# Generate code-server config
mkdir -p ~/.config/code-server
cat > ~/.config/code-server/config.yaml << EOF
bind-addr: 0.0.0.0:7860
cert: false
EOF
# Start code-server with proper configuration
code-server \
--bind-addr 0.0.0.0:7860 \
--cert false \
/data