diff --git a/backend/Dockerfile b/backend/Dockerfile index c710096..88ffb03 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -5,12 +5,12 @@ FROM base AS builder WORKDIR /app COPY package.json* pnpm-lock.yaml* ./ RUN pnpm install --frozen-lockfile --quiet --filter backend -COPY ./backend . -RUN pnpm run build +COPY . . +RUN pnpm run build --filter backend # Final stage to run the app FROM base AS runner WORKDIR /app -COPY --from=builder /app/dist ./dist +COPY --from=builder /app/backend/dist ./backend/dist EXPOSE 3000 -CMD ["pnpm", "start"] \ No newline at end of file +CMD ["pnpm", "start:backend"] \ No newline at end of file diff --git a/package.json b/package.json index dd6ec57..572fbc4 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "scripts": { "dev": "pnpm run -r dev", "dev:website": "pnpm --filter website dev", - "dev:backend": "pnpm --filter backend dev" + "dev:backend": "pnpm --filter backend dev", + "start:backend": "pnpm --filter backend start", + "start:frontend": "pnpm --filter frontend start" }, "author": "fascinated7", "license": "MIT" diff --git a/website/Dockerfile b/website/Dockerfile index 3b17c22..d222304 100644 --- a/website/Dockerfile +++ b/website/Dockerfile @@ -7,8 +7,8 @@ RUN apk add --no-cache python3 make g++ gcc pkgconfig pixman cairo-dev libjpeg-t WORKDIR /app # Copy website package and lock files only -COPY ./website/package.json* ./website/pnpm-lock.yaml* ./ -RUN pnpm install --frozen-lockfile --quiet +COPY package.json* /pnpm-lock.yaml* ./ +RUN pnpm install --frozen-lockfile --quiet --filter website # Build stage FROM base AS builder