diff --git a/.dockerignore b/.dockerignore index 87d6665..bf8fbd8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,7 +4,6 @@ dist .gitignore /.vscode /.DS_Store -pnpm-lock.yaml npm-debug.log Dockerfile docker-compose.yml diff --git a/.gitignore b/.gitignore index a547bf3..b7b9ab0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ lerna-debug.log* node_modules dist +.pnpm-store dist-ssr *.local diff --git a/Dockerfile b/Dockerfile index a581c51..24b5a28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,9 @@ # Build stage -FROM node:20-alpine AS builder +FROM node:22 AS builder WORKDIR /app -# Install build dependencies and pnpm (via corepack) -RUN apk add --no-cache python3 make g++ && \ - corepack enable && corepack prepare pnpm@latest --activate +# Install pnpm via corepack +RUN corepack enable && corepack prepare pnpm@latest --activate # Copy package manifests first for better caching COPY package.json pnpm-lock.yaml ./ @@ -17,7 +16,7 @@ RUN pnpm install --frozen-lockfile RUN pnpm build # Production image -FROM nginx:stable-alpine +FROM nginx:stable COPY --from=builder /app/dist /usr/share/nginx/html # Add custom nginx config for SPA routing diff --git a/docker-compose.yml b/docker-compose.yml index 4534558..40df4d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.8' services: web: build: . @@ -10,13 +9,13 @@ services: restart: unless-stopped dev: - image: node:20 + image: node:22 working_dir: /app volumes: - ./:/app:cached - /app/node_modules command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev --host 0.0.0.0" ports: - - "5173:5173" + - "5174:5173" environment: - CHOKIDAR_USEPOLLING=true