mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-02-05 20:48:17 +00:00
4a06b3943c
* perf: optimize docker image * perf: shrink image size * fix: build docker image * fix: docker image namespace * docs: add docker compose example * docs: fix docker compose example * docs: fix again :) * docs: and again.....
20 lines
326 B
Docker
20 lines
326 B
Docker
# build front-end
|
|
FROM node:lts-alpine AS builder
|
|
|
|
COPY ./ /app
|
|
WORKDIR /app
|
|
|
|
RUN npm install pnpm -g && pnpm install && pnpm run build
|
|
|
|
# service
|
|
FROM node:lts-alpine
|
|
|
|
COPY /service /app
|
|
COPY --from=builder /app/dist /app/public
|
|
|
|
WORKDIR /app
|
|
RUN npm install pnpm -g && pnpm install
|
|
|
|
EXPOSE 3002
|
|
|
|
CMD ["pnpm", "run", "start"] |