HomePhabricator

[Cashtab] Copy env.sample in Docker build when .env is missing

Description

[Cashtab] Copy env.sample in Docker build when .env is missing

Summary: After .env was removed from the repo (D20026), docker builds without a .env in the context (including @bot preview-cashtab) blank the app with Uncaught Error: Missing required parameters: sitekey. Copy env.sample to .env before the Vite build only when .env is absent so prod/local overrides in the build context are preserved.

Test Plan:

  • docker build -f cashtab.Dockerfile --build-arg NGINX_CONF=nginx-preview.conf -t cashtab_preview .
  • docker run --rm -p 8080:80 cashtab_preview
  • Open localhost:8080; app loads (no blank screen / sitekey console error)
  • With a real cashtab/.env present in the build context, confirm it is not overwritten

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D20360

Details

Provenance
bytesofmanAuthored on Jul 21 2026, 13:22
bytesofmanPushed on Jul 22 2026, 11:27
Reviewer
Restricted Project
Differential Revision
D20360: [Cashtab] Copy env.sample in Docker build when .env is missing
Parents
rABC8fcafa82d7d1: [electrum] mention dependency on setuptools and secp256k1 in CONTRIBUTING.md
Branches
Unknown
Tags
Unknown