mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-14 18:18:28 +00:00
fix: show the container hostname in the shell prompt
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(). The prompt read "0", the first dot-separated field of 0.0.0.0, even though the container hostname itself was set correctly. Pass the hostname in as HOST alongside the hostname: key, both from a single SERVICE_HOSTNAME variable. Neither service reads HOST itself -- code-server binds [::]:8443, Paseo binds PASEO_LISTEN -- so this only affects the prompt. Not named HOSTNAME: Compose interpolation lets the deploying shell's environment win over the .env file, and HOSTNAME is set in every container, including the one Coolify runs in. PASEO_LABEL is renamed to SERVICE_HOSTNAME; it was never a Paseo variable. The example git identity is blanked out along with it.
This commit is contained in:
1 parent
f02de334e5
commit
2a4e635e09
6 files changed
+48
-7
No files matched your search
+6
-4
@@ -18,8 +18,10 @@ PASEO_HOSTNAMES=
|
||||
PASEO_TRUSTED_PROXIES=uniquelocal
|
||||
|
||||
# Container hostname, shown as the host label in the web UI. Without it the
|
||||
# label is a random container ID.
|
||||
PASEO_LABEL=paseo
|
||||
# label is a random container ID. Also passed in as HOST -- the name zsh's
|
||||
# prompt shows. Not named HOSTNAME: the deploying shell's own HOSTNAME would
|
||||
# override it.
|
||||
SERVICE_HOSTNAME=paseo
|
||||
|
||||
# Agent CLIs to install on start, if not already present. Space- or
|
||||
# comma-separated, from: claude codex opencode copilot omp pi. Leave empty to
|
||||
@@ -32,8 +34,8 @@ TZ=Asia/Ho_Chi_Minh
|
||||
|
||||
# Git identity for agents and terminals, as author and committer. git reads
|
||||
# these directly, so no `git config` step is needed.
|
||||
GIT_NAME=tiennm99
|
||||
GIT_EMAIL=tiennm99@outlook.com
|
||||
GIT_NAME=
|
||||
GIT_EMAIL=
|
||||
|
||||
# Shell for Paseo's terminals. Paseo reads $SHELL and otherwise falls back to
|
||||
# /bin/sh (dash); it ignores the user's login shell, so `chsh` has no effect.
|
||||
|
||||
Reference in new issue
Block a user