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

+2 -1
View File
@@ -2,7 +2,8 @@
#
# cp .env.example .env
# Container hostname, shown as the host label in the web UI.
# Container hostname, shown as the host label in the web UI. Also passed in as
# HOST -- the name zsh's prompt shows.
SERVICE_HOSTNAME=paseo
# Password for the daemon API and web UI. Also the paseo user's login password,
+9 -3
View File
@@ -35,7 +35,7 @@ your own machine.
| `PASEO_HOSTNAMES` | Domains allowed to reach the daemon, comma-separated. Your domain must be listed. |
| `PASEO_TRUSTED_PROXIES` | Set to `uniquelocal`, or the UI loads but never connects. |
| `AGENTS` | Agent CLIs to install on start if missing, space- or comma-separated. Empty installs none. See [Agents](#agents). |
| `SERVICE_HOSTNAME` | Container hostname, shown as the host label in the UI. Without it the label is a random container ID. |
| `SERVICE_HOSTNAME` | Container hostname, shown as the host label in the UI and in the shell prompt. Without it the label is a random container ID. |
| `GIT_NAME` / `GIT_EMAIL` | Git author and committer identity for agents and terminals. |
`PASEO_TRUSTED_PROXIES` matches the proxy's *source IP*, so hostnames are
@@ -46,8 +46,14 @@ the browser blocks that as mixed content. `uniquelocal` covers the private
ranges Docker uses. An exact CIDR works too, but Coolify assigns a fresh subnet
per project.
`SERVICE_HOSTNAME` sets the container's `hostname:`, which is where the daemon
takes its host label from.
`SERVICE_HOSTNAME` is used twice: as the container's `hostname:`, which is
where the daemon takes its host label from, 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 would read `0`, the first dot-separated field
of `0.0.0.0`. Paseo itself never reads `HOST` — it binds `PASEO_LISTEN` — so
overriding it only affects the prompt. bash is unaffected; its `\h` uses the
real hostname.
`SHELL=/bin/zsh` and `TZ=Asia/Ho_Chi_Minh` are written into `compose.yml`
directly rather than read from `.env`, which is why neither is in the table.
+1
View File
@@ -14,6 +14,7 @@ services:
- GIT_AUTHOR_EMAIL=${GIT_EMAIL}
- GIT_COMMITTER_NAME=${GIT_NAME}
- GIT_COMMITTER_EMAIL=${GIT_EMAIL}
- HOST=${SERVICE_HOSTNAME}
volumes:
- 'paseo-home:/home/paseo'
- 'paseo-workspace:/workspace'