Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (ci \ cd): Fix env resolving in new .env image path

Rostislav Dugin63887c89d8be
diff --git a/CLAUDE.md b/CLAUDE.md
index 9d685779..7d0e6d8b 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -53,4 +53,10 @@ Booleans take an `is` / `can` / `has` / `should` prefix (`isAllowed`, `canAccess
After each change run linting and formatting depending on folder you are working it.
- backend and agent has `make lint` commands
-- frontend has `pnpm lint` and `pnpm format` commands
\ No newline at end of file
+- frontend has `pnpm lint` and `pnpm format` commands
+
+### No "how it was" comments, no unrequested backward compatibility
+
+Don't write comments that explain previous behavior ("used to be X", "was renamed from Y", "kept for legacy callers"). Code shows the current state; history lives in git.
+
+Don't preserve backward compatibility unless the user asks for it. No deprecation shims, no aliases, no fallbacks for the old shape. When planning a change that would break existing callers, schemas, configs, or APIs, call out the break explicitly in the plan. If the user approves it, delete the old code outright — do not leave a transition layer behind.
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index db473808..f5faa95a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -180,16 +180,11 @@ COPY frontend/cloud-root-content.html /app/cloud-root-content.html
# at GET /api/v1/system/agent?arch=amd64|arm64
COPY --from=agent-build /agent-binaries ./agent-binaries
-# Copy .env file to / (with fallback to .env.production.example).
-# The backend resolves .env relative to the parent of its working directory:
-# in dev, cwd is backend/ and .env sits at the repo root (parent of backend/).
-# In production, WORKDIR is /app, so .env must live at / to match.
-COPY backend/.env* /
-RUN if [ ! -f /.env ]; then \
- if [ -f /.env.production.example ]; then \
- cp /.env.production.example /.env; \
- fi; \
- fi
+# Bake .env.example as /.env so the binary has defaults when no env file is
+# mounted. The backend looks for .env at the parent of cwd (= /app), i.e. /.
+# Real env vars (-e, compose, k8s) take precedence — godotenv.Load does not
+# overwrite already-set variables.
+COPY .env.example /.env
# Create startup script
COPY <<EOF /app/start.sh