7
This commit is contained in:
parent
aff4ef4209
commit
5d439c3ad6
@ -5,12 +5,12 @@ FROM base AS builder
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json* pnpm-lock.yaml* ./
|
COPY package.json* pnpm-lock.yaml* ./
|
||||||
RUN pnpm install --frozen-lockfile --quiet --filter backend
|
RUN pnpm install --frozen-lockfile --quiet --filter backend
|
||||||
COPY ./backend .
|
COPY . .
|
||||||
RUN pnpm run build
|
RUN pnpm run build --filter backend
|
||||||
|
|
||||||
# Final stage to run the app
|
# Final stage to run the app
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/backend/dist ./backend/dist
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["pnpm", "start"]
|
CMD ["pnpm", "start:backend"]
|
@ -4,7 +4,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "pnpm run -r dev",
|
"dev": "pnpm run -r dev",
|
||||||
"dev:website": "pnpm --filter website 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",
|
"author": "fascinated7",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
|
@ -7,8 +7,8 @@ RUN apk add --no-cache python3 make g++ gcc pkgconfig pixman cairo-dev libjpeg-t
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy website package and lock files only
|
# Copy website package and lock files only
|
||||||
COPY ./website/package.json* ./website/pnpm-lock.yaml* ./
|
COPY package.json* /pnpm-lock.yaml* ./
|
||||||
RUN pnpm install --frozen-lockfile --quiet
|
RUN pnpm install --frozen-lockfile --quiet --filter website
|
||||||
|
|
||||||
# Build stage
|
# Build stage
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
|
Reference in New Issue
Block a user