Build once, run anywhere
Package the café API so it runs the same everywhere: small, fast to rebuild, without the laptop's .env or node_modules, not as root, stamped with its version, and able to report its own health.
Dockerfile
FROM node:20-alpine ARG VERSION=dev WORKDIR /app COPY package*.json ./ RUN npm ci --omit=dev COPY . . ENV NODE_ENV=production APP_VERSION=$VERSION USER node EXPOSE 3000 HEALTHCHECK CMD wget -qO- http://localhost:3000/health || exit 1 CMD ["node", "server.js"]