hermesinho commited on
Commit
1970509
·
verified ·
1 Parent(s): f6ecd07

v2: entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +44 -0
entrypoint.sh ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ APP_PASS="${APP_PASSWORD:-dev2026}"
5
+ export PASSWORD="$APP_PASS"
6
+
7
+ echo 'export PATH="/opt/hermes/.venv/bin:$PATH"' > /etc/profile.d/hermes.sh
8
+ echo 'export PATH="/opt/hermes/.venv/bin:$PATH"' >> /root/.bashrc
9
+ chmod +x /etc/profile.d/hermes.sh
10
+
11
+ ln -sf /opt/hermes/.venv/bin/hermes /usr/local/bin/hermes 2>/dev/null || true
12
+ ln -sf /opt/hermes/.venv/bin/python /usr/local/bin/hermes-python 2>/dev/null || true
13
+
14
+ cat >> /root/.bashrc << 'BASHEOF'
15
+ alias oc='opencode'
16
+ alias ll='ls -la'
17
+ alias la='ls -la'
18
+ alias ..='cd ..'
19
+ alias ...='cd ../..'
20
+ alias gs='git status'
21
+ alias gd='git diff'
22
+ alias gl='git log --oneline -10'
23
+ alias gita='git add -A'
24
+ alias gitc='git commit -m'
25
+ alias gitp='git push'
26
+ PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
27
+ BASHEOF
28
+
29
+ if [ -f /data/.env ]; then
30
+ echo '[entrypoint] Loading /data/.env'
31
+ set -a
32
+ . /data/.env
33
+ set +a
34
+ fi
35
+
36
+ echo '[entrypoint] Generating config...'
37
+ python3 /app/src/start.py || true
38
+
39
+ echo '[entrypoint] Starting code-server on port 7860...'
40
+ exec code-server --bind-addr 0.0.0.0:7860 --auth password \
41
+ --disable-telemetry --disable-update-check \
42
+ --user-data-dir /data/.code-server \
43
+ --extensions-dir /data/.code-server/extensions \
44
+ /data