Files
codex-bot 808ce95761
Advertiser console CI and test deployment / build-deploy (push) Failing after 7m15s
Use only Chromium headless runtime for server browser checks
2026-09-16 15:06:09 +08:00

23 lines
697 B
Docker

FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-bookworm-slim AS browser-tests
WORKDIR /app
COPY package*.json ./
RUN npm ci && npx playwright install --with-deps chromium --only-shell
COPY tests ./tests
COPY src/navigation.ts ./src/navigation.ts
COPY playwright.config.ts ./
CMD ["npm", "run", "test:ci"]
FROM nginx:1.27-alpine AS runtime
COPY --from=build /app/dist /usr/share/nginx/html
COPY deploy/default.conf.template /etc/nginx/templates/default.conf.template
ENV API_UPSTREAM=http://host.docker.internal:18080
EXPOSE 80
HEALTHCHECK --interval=10s --timeout=3s CMD wget -q -O /dev/null http://127.0.0.1/healthz || exit 1