diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1b8fc7a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +dist +npm-debug.log +.DS_Store diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index d44c86a..4cce521 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/Dockerfile b/Dockerfile index bcea430..e8cec5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,43 +5,19 @@ FROM node:22-bullseye AS builder ARG API_BASE_URL="https://navigolabs.com/api" -# Enable Corepack and Yarn 4 -RUN corepack enable && corepack prepare yarn@4.9.2 --activate - WORKDIR /app -# Copy Yarn 4 files -COPY package.json yarn.lock .yarnrc.yml ./ -COPY .yarn .yarn +# Copy package.json and package-lock.json +COPY package*.json ./ -# Install dependencies (immutable to match lockfile) -RUN yarn install --immutable +# Install ALL dependencies (including devDependencies) +RUN npm install -# Copy all source files +# Copy source files COPY . . # Pass API URL to Vite ENV VITE_API_BASE_URL=$API_BASE_URL # Build the app -RUN yarn build - - -# ------------------------ -# Production stage -# ------------------------ -FROM node:22-alpine AS production - -WORKDIR /app - -# Copy built files from builder stage -COPY --from=builder /app/dist ./dist - -# Install a lightweight static server -RUN npm install -g serve@14 - -# Expose port (optional but recommended) -EXPOSE 3000 - -# Start the static server -CMD ["serve", "-s", "dist", "-l", "3000"] +RUN npm run build diff --git a/index.html b/index.html index 6c54df8..f414cde 100644 --- a/index.html +++ b/index.html @@ -1,12 +1,15 @@ -
- - -