Skip to content

fix(settings): persist mutable dotenv across Docker recreation - #108

Open
samtruman wants to merge 1 commit into
moderniselife:developfrom
samtruman:fix/upstream-dotenv-persistence
Open

samtruman wants to merge 1 commit into
moderniselife:developfrom
samtruman:fix/upstream-dotenv-persistence

Conversation

@samtruman

Copy link
Copy Markdown
Contributor

Problem

The Settings API writes mutable values to /app/.env, which is part of the container filesystem and is lost during Docker recreation.

Root cause

The persistent /config mount was not used as the dotenv write/load source, and Bun could continue loading the volatile /app/.env.

Fix

Migrate legacy /app/.env to /config/.env, expose the persistent file through /app/.env for Bun startup loading, write atomically with restrictive permissions, and make the Compose config mount writable.

This complements #104: that PR separates container environment provenance from persisted dotenv values, while this PR makes the persisted dotenv physically durable across container recreation.

Tests

  • shell syntax check
  • existing upstream suite: 84/84 pass
  • isolated Docker recreate test validated on the source image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant