#!/bin/sh # Builds and serves the application exactly as the container does. # # `next start` refuses to work with output: standalone, and running the # standalone server directly is what the Dockerfile does anyway — so the E2E # suite exercises the same artifact shape that ships, rather than a second # arrangement that could drift from it. set -e npm run build # The standalone bundle does not carry these; the Dockerfile copies them too. rm -rf .next/standalone/.next/static .next/standalone/public cp -r .next/static .next/standalone/.next/static cp -r public .next/standalone/public exec node .next/standalone/server.js