server install core using link instead of file (#2025)
Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
parent
3412a23654
commit
9cc9b4dffc
@ -32,7 +32,10 @@ COPY --from=builder /app/node_modules ./node_modules/
|
||||
COPY --from=builder /app/yarn.lock ./yarn.lock
|
||||
|
||||
# Copy the package.json, yarn.lock, and build output of server yarn space to leverage Docker cache
|
||||
COPY --from=builder /app/core ./core/
|
||||
COPY --from=builder /app/server ./server/
|
||||
RUN cd core && yarn install && yarn run build
|
||||
RUN yarn workspace @janhq/server install && yarn workspace @janhq/server build
|
||||
COPY --from=builder /app/docs/openapi ./docs/openapi/
|
||||
|
||||
# Copy pre-install dependencies
|
||||
|
||||
@ -56,7 +56,10 @@ COPY --from=builder /app/node_modules ./node_modules/
|
||||
COPY --from=builder /app/yarn.lock ./yarn.lock
|
||||
|
||||
# Copy the package.json, yarn.lock, and build output of server yarn space to leverage Docker cache
|
||||
COPY --from=builder /app/core ./core/
|
||||
COPY --from=builder /app/server ./server/
|
||||
RUN cd core && yarn install && yarn run build
|
||||
RUN yarn workspace @janhq/server install && yarn workspace @janhq/server build
|
||||
COPY --from=builder /app/docs/openapi ./docs/openapi/
|
||||
|
||||
# Copy pre-install dependencies
|
||||
|
||||
@ -13,9 +13,8 @@
|
||||
"scripts": {
|
||||
"lint": "eslint . --ext \".js,.jsx,.ts,.tsx\"",
|
||||
"test:e2e": "playwright test --workers=1",
|
||||
"build:core": "cd node_modules/@janhq/core && yarn install && yarn build",
|
||||
"dev": "yarn build:core && tsc --watch & node --watch build/main.js",
|
||||
"build": "yarn build:core && tsc"
|
||||
"dev": "tsc --watch & node --watch build/main.js",
|
||||
"build": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alumna/reflect": "^1.1.3",
|
||||
@ -24,7 +23,8 @@
|
||||
"@fastify/static": "^6.12.0",
|
||||
"@fastify/swagger": "^8.13.0",
|
||||
"@fastify/swagger-ui": "2.0.1",
|
||||
"@janhq/core": "file:../core",
|
||||
"@janhq/core": "link:./core",
|
||||
"@npmcli/arborist": "^7.3.1",
|
||||
"dotenv": "^16.3.1",
|
||||
"fastify": "^4.24.3",
|
||||
"request": "^2.88.2",
|
||||
@ -41,8 +41,5 @@
|
||||
"run-script-os": "^1.1.6",
|
||||
"@types/tcp-port-used": "^1.0.4",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"bundleDependencies": [
|
||||
"@janhq/core"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user