Deploy: make a missing .env name its own fix
With no .env found, compose fell back to a sentinel path and the daemon reported: Bind mount failed: 'DATA_ROOT-is-unset/postgres' does not exist — accurate, but it tells the operator nothing about what to do, and this is the most common way the install goes wrong (the file is generated by `init`, not shipped in the repo, so any re-copy of the folder loses it). The sentinel is now /NO-.env-FOUND-RUN-deploy_webmail.sh-init-FIRST, so the daemon's own error states the fix. doctor also checks for a missing or empty .env before anything else and says the same thing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nux3LCu4zP9nih4BRhPyHw
This commit is contained in:
@@ -234,6 +234,10 @@ cmd_doctor() {
|
||||
require_env
|
||||
local ok=0
|
||||
|
||||
if [ ! -s "$ENV_FILE" ]; then
|
||||
red " $ENV_FILE is missing or empty — nothing will start. Run: webmail.sh init" >&2
|
||||
fi
|
||||
|
||||
echo "config:"
|
||||
echo " DATA_ROOT ${DATA_ROOT}"
|
||||
echo " APP_DOMAIN ${APP_DOMAIN:-<unset>}"
|
||||
|
||||
Reference in New Issue
Block a user