7
This commit is contained in:
parent
aff4ef4209
commit
5d439c3ad6
@ -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"]
|
||||
CMD ["pnpm", "start:backend"]
|
@ -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"
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user