-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup.sh
More file actions
executable file
·33 lines (24 loc) · 1.11 KB
/
startup.sh
File metadata and controls
executable file
·33 lines (24 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
set -e
if [ -z "${PASSWORD}" ]; then
mkdir -p /settings/.config/code-server
echo "auth: none" > /settings/.config/code-server/config.yaml
echo "cert: false" >> /settings/.config/code-server/config.yaml
fi
if [ -n "${GIT_DATA}" ]; then
echo "Cloning ${GIT_DATA} to /data"
sudo rm -rf /data/*
sudo chown coder. /data
git clone "${GIT_DATA}" --branch "${GIT_DATA_BRANCH:-master}" --single-branch /data
fi
if [ ! -f "/settings/.local/share/code-server/User/settings.json" ]; then
mkdir -p /settings/.local/share/code-server/User
echo "{\"editor.suggest.showWords\": false, \"workbench.colorTheme\": \"Default Dark Modern\", \"editor.suggest.showStatusBar\": true}" > /settings/.local/share/code-server/User/settings.json
fi
if [ -n "${BASE_URL}" ]; then
mkdir -p /settings/.local/share/code-server/Machine
echo "{\"ldproxy-editor.baseUrl\": \"${BASE_URL}\"}" > /settings/.local/share/code-server/Machine/settings.json
fi
code-server --install-extension /ldproxy-editor.vsix
code-server --install-extension redhat.vscode-yaml
exec dumb-init /usr/bin/xtracfg listen 8081 --debug --verbose &