ThongCoder commited on
Commit
01152d5
·
verified ·
1 Parent(s): 4a5cf8f

Update entrypoint.py

Browse files
Files changed (1) hide show
  1. entrypoint.py +1 -9
entrypoint.py CHANGED
@@ -20,14 +20,7 @@ except Exception as e:
20
  threading.Thread(target=schedule_backups, daemon=True).start()
21
 
22
  # Write config.yaml
23
- config_path = f"{home}/.config/code-server/config.yaml"
24
- with open(config_path, "w") as f:
25
- f.write(f"""bind-addr: 0.0.0.0:7860
26
- auth: password
27
- password: {password}
28
- cert: false
29
- """)
30
-
31
  # Prepare environment
32
  env = os.environ.copy()
33
  env["HOME"] = home
@@ -40,7 +33,6 @@ cmd = [
40
  "code-server",
41
  "--bind-addr", "0.0.0.0:7860",
42
  "--auth", "password",
43
- "--password", password,
44
  "--user-data-dir", f"{home}/.local/share/code-server",
45
  "/workspace"
46
  ]
 
20
  threading.Thread(target=schedule_backups, daemon=True).start()
21
 
22
  # Write config.yaml
23
+ os.environ['PASSWORD'] = password
 
 
 
 
 
 
 
24
  # Prepare environment
25
  env = os.environ.copy()
26
  env["HOME"] = home
 
33
  "code-server",
34
  "--bind-addr", "0.0.0.0:7860",
35
  "--auth", "password",
 
36
  "--user-data-dir", f"{home}/.local/share/code-server",
37
  "/workspace"
38
  ]