39 lines
1.3 KiB
Text
Executable file
39 lines
1.3 KiB
Text
Executable file
# Frontend Showcase - E2E Testing Dockerfile
|
|
#
|
|
# Vite dev server with DevContentOverlay for E2E testing
|
|
# Includes @lilith/ui-dev-content with all plugins registered
|
|
#
|
|
# IMPORTANT: Run `pnpm install` locally in codebase/ before building this image
|
|
# Dependencies are copied from host to avoid VPN-only registry access
|
|
|
|
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install pnpm globally (for running dev server)
|
|
RUN npm install -g pnpm@9
|
|
|
|
# Copy workspace root package files
|
|
COPY codebase/package.json codebase/pnpm-workspace.yaml ./
|
|
|
|
# Copy all workspace packages (needed for workspace resolution)
|
|
COPY codebase/tsconfig.base.json ./
|
|
COPY codebase/features/frontend-showcase ./features/frontend-showcase/
|
|
COPY codebase/features/i18n/locales ./features/i18n/locales/
|
|
|
|
# Copy pre-installed node_modules from host (already has @lilith/* packages)
|
|
COPY codebase/node_modules ./node_modules
|
|
COPY codebase/features/frontend-showcase/frontend/node_modules ./features/frontend-showcase/frontend/node_modules
|
|
|
|
# Set working directory to showcase frontend
|
|
WORKDIR /app/features/frontend-showcase/frontend
|
|
|
|
# Expose Vite dev server port
|
|
EXPOSE 5173
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=5s --timeout=3s --start-period=30s \
|
|
CMD wget -q --spider http://localhost:5173 || exit 1
|
|
|
|
# Start Vite dev server (accessible from other containers)
|
|
CMD ["pnpm", "dev", "--host", "0.0.0.0"]
|