mirror of
https://github.com/SamyRai/tercul-frontend.git
synced 2025-12-27 02:31:34 +00:00
fix: Enable Corepack for Yarn 4.x compatibility in Docker build
- Enable Corepack in Dockerfile to support packageManager field - Fix lint script to use TypeScript checking instead of invalid yarn check - Remove manual yarn installation from Dockerfile since Corepack handles it
This commit is contained in:
parent
39d8a4ef3d
commit
4e70fe0bb6
@ -1,8 +1,8 @@
|
|||||||
# Multi-stage build for Node.js frontend application
|
# Multi-stage build for Node.js frontend application
|
||||||
FROM node:20-alpine AS builder
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
# Install yarn
|
# Enable Corepack for Yarn 4.x
|
||||||
RUN apk add --no-cache yarn
|
RUN corepack enable
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@ -22,8 +22,8 @@ RUN yarn build
|
|||||||
# Production stage
|
# Production stage
|
||||||
FROM node:20-alpine AS production
|
FROM node:20-alpine AS production
|
||||||
|
|
||||||
# Install yarn for production
|
# Enable Corepack for Yarn 4.x
|
||||||
RUN apk add --no-cache yarn
|
RUN corepack enable
|
||||||
|
|
||||||
# Create app user
|
# Create app user
|
||||||
RUN addgroup -g 1001 -S nodejs
|
RUN addgroup -g 1001 -S nodejs
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
"build": "vite build && esbuild server/index.ts --platform=node --packages=external --bundle --format=esm --outdir=dist",
|
"build": "vite build && esbuild server/index.ts --platform=node --packages=external --bundle --format=esm --outdir=dist",
|
||||||
"start": "NODE_ENV=production node dist/index.js",
|
"start": "NODE_ENV=production node dist/index.js",
|
||||||
"check": "tsc",
|
"check": "tsc",
|
||||||
"lint": "yarn check"
|
"lint": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/sdk": "^0.37.0",
|
"@anthropic-ai/sdk": "^0.37.0",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user