Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix: dockerfile issues

Asuka109a48bbac39800
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..020069f86
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,4 @@
+target
+build
+*.pdf
+node_modules
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 000000000..38f11c645
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+registry=https://registry.npmjs.org
diff --git a/Dockerfile b/Dockerfile
index 1f281e768..70a7baba3 100644
--- a/Dockerfile
+++ b/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"]
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 5a83b331a..ead20dad2 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -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