cff52b4b9e
- Travel dates: TopBar chip + popover (outbound/return/travellers); sent to Grok prompt; itinerary.needsTravelDates drives a nudge banner; cache and prefetch ledger invalidate when dates change - Sea crossings: CrossingOption schema (Eurotunnel, DFDS, P&O, Brittany, Stena Line); CrossingSwapBlock under tunnel/ferry/crossing stops with trip-impact deltas and Book links; prompt requires 3-5 real options for every UK ↔ mainland route; picking a crossing triggers silent re-plan - Tesla in-car polish: UA + heuristic detection sets <html class="incar">; CSS overrides kill backdrop-filter, scale fonts, enforce 44px tap targets, disable hover flicker; geolocation + reverse geocode + crosshair button inside the From input; up/down arrow reorder buttons replace touch-broken HTML5 drag-and-drop - Tesla Fleet API stub: /.well-known/appspecific/com.tesla.3p.public-key.pem served from TESLA_FLEET_PUBLIC_KEY for partner domain verification; OAuth callback + vehicle_data stub return 503 until partner approval - Dockerfile + .dockerignore for Dokku deployment; server now serves client/dist in production
45 lines
1.5 KiB
Docker
45 lines
1.5 KiB
Docker
# syntax=docker/dockerfile:1.6
|
|
# Multi-stage build: install + build the client and server, then run a slim
|
|
# node image that serves both from one process on $PORT (default 3000).
|
|
|
|
# ─── Stage 1: deps + build ──────────────────────────────────────────────────
|
|
FROM node:22-bookworm-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Root deps
|
|
COPY package.json package-lock.json* ./
|
|
RUN --mount=type=cache,target=/root/.npm npm ci --no-audit --no-fund
|
|
|
|
# Client deps
|
|
COPY client/package.json client/package-lock.json* ./client/
|
|
RUN --mount=type=cache,target=/root/.npm npm --prefix client ci --no-audit --no-fund
|
|
|
|
# Source
|
|
COPY tsconfig.json ./
|
|
COPY server ./server
|
|
COPY client ./client
|
|
|
|
# Build client (vite → client/dist) and server (tsc → dist/server)
|
|
RUN npm run build
|
|
|
|
# ─── Stage 2: runtime ───────────────────────────────────────────────────────
|
|
FROM node:22-bookworm-slim AS runtime
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
|
|
WORKDIR /app
|
|
|
|
# Only ship the prod deps + built artefacts
|
|
COPY package.json package-lock.json* ./
|
|
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev --no-audit --no-fund \
|
|
&& npm cache clean --force
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
COPY --from=builder /app/client/dist ./client/dist
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "dist/server/index.js"]
|