diff --git a/Dockerfile b/Dockerfile index bcea4305..b62bb35b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,26 +5,22 @@ 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 dependencies +RUN npm ci -# 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 +RUN npm run build # ------------------------ @@ -34,14 +30,14 @@ FROM node:22-alpine AS production WORKDIR /app -# Copy built files from builder stage +# Copy build output from builder COPY --from=builder /app/dist ./dist # Install a lightweight static server RUN npm install -g serve@14 -# Expose port (optional but recommended) +# Expose port EXPOSE 3000 -# Start the static server +# Start the app CMD ["serve", "-s", "dist", "-l", "3000"] diff --git a/src/main.tsx b/src/main.tsx index d96f8d89..236dddf2 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,6 @@ - import { createRoot } from "react-dom/client"; - import App from "./App.tsx"; - import "./index.css"; +import { createRoot } from "react-dom/client"; +import App from "./App.tsx"; +// import "./index.css"; - createRoot(document.getElementById("root")!).render(); - \ No newline at end of file +createRoot(document.getElementById("root")!).render();