Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Build contexts for the Tracker images (tracker-web, tracker-api, tracker-gateway)
# are this `src/` directory. Keep the context small and hermetic: every image
# restores its own dependencies and builds from source inside the build, so host
# build outputs and installed modules must never leak in.

# Node / Nx
**/node_modules
dist
.nx
tmp
.angular
coverage
playwright-report
test-output
**/*.tsbuildinfo

# .NET build outputs (the tracker-api image restores + publishes from source)
**/bin
**/obj
**/*.user

# VCS / editor / OS
.git
.gitignore
.vs
.vscode
.idea
**/.DS_Store

# Local env files must not be baked into images
**/.env
**/.env.*
!**/.env.example
11 changes: 6 additions & 5 deletions src/apps/tracker-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
# docker build -f apps/tracker-web/Dockerfile -t evolith-tracker-web:local src/
#
# The SPA reads its BFF base URL from VITE_TRACKER_BFF_BASE_URL at BUILD time
# (import.meta.env). We default it to the relative path `/api`, and nginx (see
# nginx.conf) proxies `/api` → the tracker-api service, so the same image works
# in any cluster without rebuilding. Override VITE_TRACKER_BFF_BASE_URL as a
# build-arg to bake an absolute URL instead.
# (import.meta.env). We default it to the relative path `/api/v1` — the tracker-api
# business surface is versioned under /api/v1 (CD-32), which is also the SPA's own
# code default — and nginx (see nginx.conf) proxies `/api` → the tracker-api service,
# so the same image works in any cluster without rebuilding. Override
# VITE_TRACKER_BFF_BASE_URL as a build-arg to bake an absolute URL instead.
# ──────────────────────────────────────────────────────────────────────────
FROM node:20-alpine AS build

Expand All @@ -22,7 +23,7 @@ RUN npm ci --legacy-peer-deps
# Bring in the workspace and build only the web app via the Nx/Vite target.
COPY . ./

ARG VITE_TRACKER_BFF_BASE_URL=/api
ARG VITE_TRACKER_BFF_BASE_URL=/api/v1
ENV VITE_TRACKER_BFF_BASE_URL=${VITE_TRACKER_BFF_BASE_URL}

RUN npx nx build tracker-web --configuration=production \
Expand Down
Loading