File size: 384 Bytes
e9fbe55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# Default to blank if not provided
: "${PASSWORD:=changeme}"

echo "Starting code-server with secure password from ENV..."

mkdir -p ~/.config/code-server
cat > ~/.config/code-server/config.json <<EOF
{
  "bind-addr": "0.0.0.0:7860",
  "auth": "password",
  "password": "${PASSWORD}",
  "cert": false
}
EOF

exec code-server --host 0.0.0.0 --port 7860 /home/coder/project