This commit is contained in:
2025-11-03 18:42:04 -08:00
parent 30649488bb
commit eb084e1f07
12 changed files with 64 additions and 15 deletions

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
FROM rust:1.91 AS rust-builder
WORKDIR /app
RUN cargo install wasm-pack
COPY rust/ ./rust/
WORKDIR /app/rust/rhai-codemirror
RUN wasm-pack build --target web --out-dir "../../webui/src/wasm/rhai-codemirror"
WORKDIR /app/rust/runner
RUN wasm-pack build --target web --out-dir "../../webui/src/wasm/runner"
FROM node:24-alpine AS app
WORKDIR /app
RUN npm install -g bun
COPY webui/package.json webui/bun.lock* ./webui/
WORKDIR /app/webui
RUN bun install --frozen-lockfile
COPY webui/ ./
COPY --from=rust-builder /app/webui/src/wasm/ ./src/wasm/
RUN bun run build
RUN mkdir -p ../data/scripts
EXPOSE 3000
CMD ["bun", "start"]