Skip to content

fix(docker): πŸ› simplify Dockerfile β€” build at startup so gui.env vars are available#867

Merged
phoebus-84 merged 1 commit into
mainfrom
fix/simplify-dockerfile-build-at-startup
Jun 18, 2026
Merged

fix(docker): πŸ› simplify Dockerfile β€” build at startup so gui.env vars are available#867
phoebus-84 merged 1 commit into
mainfrom
fix/simplify-dockerfile-build-at-startup

Conversation

@phoebus-84

Copy link
Copy Markdown
Collaborator

Problem

PR #865 moved next build to Docker image build time (multi-stage). On CI, no .env files exist (gitignored), so NEXT_PUBLIC_* vars were undefined when inlined into the client JS bundle. Apollo defaulted to /graphql.

Fix

Reverts to a single stage Dockerfile that:

  • Installs deps before setting NODE_ENV=production (devDeps like TypeScript are included)
  • Runs pnpm build at container startup via CMD, when gui.env is already loaded by docker-compose
  • Keeps NODE_ENV=production for Next.js build optimizations

This restores the original deployment pattern where NEXT_PUBLIC_* vars are available during next build because docker-compose has already loaded gui.env.

Companion PR

DTECH_HSU_2025_OPS#7 β€” fixes gui.env.j2 to use proper Jinja2 variables instead of ${BASE_URL}

… are available

The multi-stage build moved next build to image time, where no .env files
exist on CI. NEXT_PUBLIC_* vars were undefined and Apollo defaulted to /graphql.

This reverts to a single stage that:
- Installs deps before setting NODE_ENV (devDeps like TypeScript are included)
- Runs pnpm build at container STARTUP via CMD, when gui.env is already
  loaded by docker-compose
- Keeps NODE_ENV=production for the Next.js build optimizations
@phoebus-84 phoebus-84 merged commit 47c2910 into main Jun 18, 2026
1 check passed
@phoebus-84 phoebus-84 deleted the fix/simplify-dockerfile-build-at-startup branch June 18, 2026 11:11
phoebus-84 added a commit that referenced this pull request Jul 2, 2026
- **chore: πŸ”§ new publish workflow also for tchibo branch (#809)**
- **style: 🎨  lighter markdown editor (#763)**
- **feat: ✨ links to projects now lead to new products page (#813)**
- **feat: ✨ improve UX for unauthenticated users (#814)**
- **fix: πŸ› project images editing (#817)**
- **fix: πŸ› qr code disappear for projects that have it and new tabs
mapping for url params (#818)**
- **feat: ✨ add recyclability and repairability filters (#821)**
- **feat: interfacer gui big rework phase 1 (#825)**
- **fix: πŸ› migrate to mominatim for location autocomplete and lookup
(#834)**
- **feat(dpp): ✨ dedicated DPP detail page with prototype-matching UI
(#835)**
- **feat(layout): ✨ show top bar and sidebar for unauthenticated users
(#836)**
- **fix(nav): πŸ› Designs links to /designs, fix active state catch-all
(#837)**
- **feat: ✨ wire sorting orderBy and distinctPrimaryAccountableCount
from backend (#838)**
- **feat(dpp): ✨ redesign DPP tab to match Figma prototype (#839)**
- **refactor(ui): remove redundant owner banners and fix search filters
(#840)**
- **refactor(tags): ♻️ 🏷️ prefix user tags with tag- to disambiguate
from system classifiedAs (#841)**
- **feat(project): ✨ add DPP-backed 3D model viewer (#848)**
- **fix(docker): πŸ› replace broken pnpm download URL with corepack
(#849)**
- **fix(cards): πŸ› remove image rounded corners and allow two-line titles
(#860)**
- **fix(docker): πŸ› pin pnpm version to fix frozen-lockfile mismatch
(#863)**
- **fix: πŸ› re-add Machines tab to profile page with proper spec
filtering (#861)**
- **fix: πŸ› restrict manufacturability filter to designs catalog, driven
by derived products (#859)**
- **fix: πŸ› catalogue filters ux, remove apply button (#858)**
- **fix(docker): πŸ› fix build failure β€” NODE_ENV blocking devDeps and
transpilePackages config (#865)**
- **fix(docker): πŸ› simplify Dockerfile β€” build at startup so gui.env
vars are available (#867)**
- **feat: ✨ implement feedback system (reviews + comments) in project
detail pages (#862)**
- **fix: πŸ› unrelated dpps in product details (#869)**
- **feat: 3D viewer controls (zoom, rotate, fullscreen) and multi-CAD
file support (#868)**

---------

Co-authored-by: Puria Nafisi Azizi <puria@dyne.org>
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