# Lovelace — the Next.js surface.
#
# Runtime only. The standalone build is produced by CI, the same split
# rust-blog uses: building inside the image would mean shipping a toolchain and
# a node_modules tree to production for no reason.
#
# Expected build context (assembled by the workflow):
# .next/standalone/ → the server plus its traced dependencies
# .next/static/ → hashed JS and CSS
# public/ → static files, including the voice-lab probe clip
FROM public.ecr.aws/docker/library/node:22-alpine
WORKDIR /app
ENV NODE_ENV=production \
PORT=3000 \
HOSTNAME=0.0.0.0
COPY --chown=node:node . .
USER node
EXPOSE 3000
# `server.js` is what `output: "standalone"` emits.
CMD ["node", "server.js"]