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-lsio
# Web UI login password. Required.
+9 -1
View File
@@ -32,7 +32,7 @@ separate rootless daemon.
| Variable | Purpose |
| --- | --- |
| `SERVICE_HOSTNAME` | Container hostname. |
| `SERVICE_HOSTNAME` | Container hostname, and the name the shell prompt shows. |
| `PASSWORD` | Web UI login, also the in-container sudo password. Required. |
| `GIT_NAME` / `GIT_EMAIL` | Git author and committer identity |
| `PWA_APPNAME` | Optional. Name of the installed web app; defaults to `code-server`. |
@@ -43,6 +43,14 @@ The compose file refuses to start when `PASSWORD` is unset or blank. The image
itself would start anyway and serve code-server with no authentication, on a
container that holds the Docker socket.
`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 the prompt reads `0`, the first
dot-separated field of `0.0.0.0`. code-server itself never reads `HOST` — it
binds `[::]:8443` — so overriding it only affects the prompt. bash is
unaffected; its `\h` uses the real hostname.
`PUID`/`PGID` are pinned to `1000` in `compose.yml`; the `Dockerfile` depends
on that (see [Storage](#storage)).
+1
View File
@@ -17,6 +17,7 @@ services:
- GIT_AUTHOR_EMAIL=${GIT_EMAIL}
- GIT_COMMITTER_NAME=${GIT_NAME}
- GIT_COMMITTER_EMAIL=${GIT_EMAIL}
- HOST=${SERVICE_HOSTNAME}
# - PWA_APPNAME=${PWA_APPNAME:-code-server}
volumes:
- 'code-server-config:/config'