chore: add Keyv package for improved caching and key-value storage
- Added Keyv package (v5.3.1) to package.json for flexible key-value storage - Updated package-lock.json with Keyv and related dependencies - Simplified Dockerfile dependency management - Removed unnecessary buffer and readable-stream package duplicates
This commit is contained in:
parent
4d4de411f2
commit
18582c1fdc
3 changed files with 496 additions and 406 deletions
|
@ -7,27 +7,33 @@ COPY . .
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
# Generate Prisma client
|
|
||||||
RUN cd apps/api && npm run prisma:generate
|
|
||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
|
RUN cd apps/api && npm run prisma:generate
|
||||||
RUN npx turbo run build --filter=api
|
RUN npx turbo run build --filter=api
|
||||||
|
|
||||||
# Remove unused files from node_modules
|
FROM base AS dependencies
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /app/package.json ./package.json
|
||||||
|
COPY --from=builder /app/package-lock.json ./package-lock.json
|
||||||
|
COPY --from=builder /app/apps/api/package.json ./apps/api/package.json
|
||||||
|
COPY --from=builder /app/apps/api/prisma ./apps/api/prisma
|
||||||
|
ARG NODE_ENV=production
|
||||||
|
RUN npm ci
|
||||||
|
RUN cd apps/api && npm run prisma:generate
|
||||||
RUN wget -O - https://gobinaries.com/tj/node-prune | sh
|
RUN wget -O - https://gobinaries.com/tj/node-prune | sh
|
||||||
RUN node-prune /app/node_modules
|
RUN node-prune /app/node_modules
|
||||||
|
|
||||||
# Copy the built project
|
# Copy the built project
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/turbo.json ./turbo.json
|
COPY --from=dependencies /app/node_modules ./node_modules
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
COPY --from=dependencies /app/package.json ./package.json
|
||||||
COPY --from=builder /app/package.json ./package.json
|
COPY --from=dependencies /app/package-lock.json ./package-lock.json
|
||||||
COPY --from=builder /app/package-lock.json ./package-lock.json
|
COPY --from=dependencies /app/apps/api/package.json ./apps/api/package.json
|
||||||
COPY --from=builder /app/apps/api/package.json ./apps/api/package.json
|
|
||||||
COPY --from=builder /app/apps/api/dist ./apps/api/dist
|
COPY --from=builder /app/apps/api/dist ./apps/api/dist
|
||||||
COPY --from=builder /app/apps/api/prisma ./apps/api/prisma
|
|
||||||
|
WORKDIR /app/apps/api
|
||||||
|
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
# Start the server
|
# Start the server
|
||||||
ENTRYPOINT [ "npm", "run", "start:api" ]
|
ENTRYPOINT [ "npm", "run", "start" ]
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
"fastify-plugin": "^5.0.0",
|
"fastify-plugin": "^5.0.0",
|
||||||
"graphql": "^16.10.0",
|
"graphql": "^16.10.0",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
|
"keyv": "^5.3.1",
|
||||||
"mercurius": "^16.1.0",
|
"mercurius": "^16.1.0",
|
||||||
"mercurius-codegen": "^6.0.1",
|
"mercurius-codegen": "^6.0.1",
|
||||||
"minio": "^8.0.4",
|
"minio": "^8.0.4",
|
||||||
|
|
873
package-lock.json
generated
873
package-lock.json
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue