mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-07-24 06:54:06 +08:00
19 lines
558 B
Docker
19 lines
558 B
Docker
# 构建 Vite 前端产物。
|
|
FROM oven/bun:1.3.13 AS web-build
|
|
|
|
WORKDIR /app/web
|
|
COPY web/package.json web/bun.lock ./
|
|
RUN --mount=type=cache,target=/root/.bun/install/cache bun install --cache-dir=/root/.bun/install/cache
|
|
COPY VERSION /app/VERSION
|
|
COPY CHANGELOG.md /app/CHANGELOG.md
|
|
COPY web ./
|
|
RUN bun run build
|
|
|
|
# 运行镜像:只启动静态前端,AI 请求由浏览器前台直连用户自己的接口。
|
|
FROM nginx:1.27-alpine
|
|
|
|
COPY --from=web-build /app/web/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 3000
|