fix: restore HOST override in zsh workspace services

Coolify injects HOST=0.0.0.0 and zsh's prompt reads $HOST instead of the
real hostname, so hostname: alone shows user@0. Set HOST=${SERVICE_HOSTNAME}
again in code-server, code-server-lsio and paseo.
This commit is contained in:
tiennm99 committed 2026-10-06 16:45:13 +07:00
1 parent 56111e9219
commit fc85962f45
10 files changed
+34 -9

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
#
# cp .env.example .env
# Container hostname.
# Container hostname, also passed in as HOST -- the name zsh's prompt shows.
SERVICE_HOSTNAME=code-server
# Web UI login password. Required.
+8 -1
View File
@@ -149,7 +149,7 @@ sdk install java
| --- | --- |
| `PASSWORD` | Web UI login. Required. |
| `GIT_NAME` / `GIT_EMAIL` | Git author and committer identity |
| `SERVICE_HOSTNAME` | Container hostname |
| `SERVICE_HOSTNAME` | Container hostname, and the name the shell prompt shows (also passed as `HOST`) |
| `CODE_SERVER_APP_NAME` | Optional. Name in the title bar and welcome page; defaults to `code-server`. |
Generate a password with `openssl rand -base64 24`.
@@ -161,6 +161,13 @@ can only read from inside the container.
The `coder` user has passwordless `sudo`, as the image sets it up. Anyone who
can log in to the editor is root in the container.
`SERVICE_HOSTNAME` is used twice: as the container's `hostname:` and as the
`HOST` variable inside it. Coolify injects `HOST=0.0.0.0` into every compose
app, and zsh seeds `$HOST` and the `%m`/`%M` prompt escapes from that variable
rather than calling `gethostname()`, so a zsh prompt reads `0`. code-server
itself never reads `HOST`; it binds through `--bind-addr`. bash is unaffected;
its `\h` uses the real hostname.
## Docker access
The host's Docker socket is bind-mounted at `/var/run/docker.sock`. The image
+1
View File
@@ -12,6 +12,7 @@ services:
- GIT_AUTHOR_EMAIL=${GIT_EMAIL}
- GIT_COMMITTER_NAME=${GIT_NAME}
- GIT_COMMITTER_EMAIL=${GIT_EMAIL}
- HOST=${SERVICE_HOSTNAME}
# - CODE_SERVER_APP_NAME=${CODE_SERVER_APP_NAME:-code-server}
volumes:
- 'code-server-home:/home/coder'