NitinBot002 commited on
Commit
e9fbe55
·
verified ·
1 Parent(s): 6e984b7

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +18 -0
entrypoint.sh ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Default to blank if not provided
4
+ : "${PASSWORD:=changeme}"
5
+
6
+ echo "Starting code-server with secure password from ENV..."
7
+
8
+ mkdir -p ~/.config/code-server
9
+ cat > ~/.config/code-server/config.json <<EOF
10
+ {
11
+ "bind-addr": "0.0.0.0:7860",
12
+ "auth": "password",
13
+ "password": "${PASSWORD}",
14
+ "cert": false
15
+ }
16
+ EOF
17
+
18
+ exec code-server --host 0.0.0.0 --port 7860 /home/coder/project