FROM node:22-bookworm WORKDIR /workspace # Build-time commit SHA, injected by docker compose (SOURCE_COMMIT) or Coolify. # Exposed to the API at /version for deploy diagnostics. ARG APP_COMMIT=unknown ENV APP_COMMIT=${APP_COMMIT} # package-lock.json is committed, so npm ci installs the exact dependency tree. COPY package.json package-lock.json ./ RUN npm ci --no-audit --no-fund COPY . . # vinext/wrangler writes logs and registry state under .wrangler; the directory # itself is git/dockerignored, so create it explicitly. RUN mkdir -p /workspace/.wrangler CMD ["npm", "run", "dev"]