mirror of
https://github.com/Automattic/harper.git
synced 2025-12-05 19:26:55 -06:00
fix: dockerfile issues
This commit is contained in:
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
||||
target
|
||||
build
|
||||
*.pdf
|
||||
node_modules
|
||||
22
Dockerfile
22
Dockerfile
@@ -1,7 +1,7 @@
|
||||
ARG NODE_VERSION=slim
|
||||
|
||||
FROM rust:latest AS wasm-build
|
||||
RUN rustup toolchain install stable-x86_64-unknown-linux-gnu
|
||||
RUN rustup toolchain install
|
||||
|
||||
RUN mkdir -p /usr/build/
|
||||
WORKDIR /usr/build/
|
||||
@@ -21,13 +21,8 @@ RUN corepack enable
|
||||
RUN mkdir -p /usr/build/
|
||||
WORKDIR /usr/build/
|
||||
|
||||
RUN mkdir harper-wasm
|
||||
|
||||
COPY . .
|
||||
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg
|
||||
COPY packages packages
|
||||
COPY demo.md .
|
||||
COPY package.json .
|
||||
COPY pnpm-lock.yaml .
|
||||
|
||||
RUN pnpm install
|
||||
|
||||
@@ -41,20 +36,11 @@ RUN pnpm build
|
||||
|
||||
FROM node:${NODE_VERSION}
|
||||
|
||||
COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build
|
||||
COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json
|
||||
COPY --from=node-build /usr/build/package.json /usr/build/package.json
|
||||
COPY --from=node-build /usr/build/pnpm-lock.yaml /usr/build/pnpm-lock.yaml
|
||||
COPY --from=node-build /usr/build/pnpm-workspace.yaml /usr/build/pnpm-workspace.yaml
|
||||
COPY --from=node-build /usr/build/packages/web/build /usr/build
|
||||
|
||||
WORKDIR /usr/build
|
||||
|
||||
RUN corepack enable
|
||||
RUN pnpm install
|
||||
|
||||
WORKDIR /usr/build/packages/web
|
||||
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=3000
|
||||
|
||||
ENTRYPOINT ["node", "build"]
|
||||
ENTRYPOINT ["node", "index"]
|
||||
|
||||
@@ -2,9 +2,18 @@ packages:
|
||||
- packages/*
|
||||
- harper-wasm/pkg
|
||||
- packages/harper.js/examples/*
|
||||
|
||||
catalog:
|
||||
typescript: ^5.8.2
|
||||
tslib: ^2.8.1
|
||||
'@types/node': ^22.13.10
|
||||
'@babel/runtime': ^7.26.10
|
||||
onlyBuiltDependencies:
|
||||
- '@biomejs/biome'
|
||||
- '@parcel/watcher'
|
||||
- '@swc/core'
|
||||
- '@vscode/vsce-sign'
|
||||
- core-js
|
||||
- core-js-pure
|
||||
- esbuild
|
||||
- keytar
|
||||
- msw
|
||||
|
||||
Reference in New Issue
Block a user